Tehran (AFP) – Iran’s Supreme Leader Ayatollah Ali Khamenei on Thursday appointed ultra-conservative cleric Ebrahim Raisi, a one-time presidential hopeful, as head of the judiciary, the leader’s website said.

Former judge Raisi, who currently heads the holy shrine of Imam Reza, was the leading rival to President Hassan Rouhani at Iran’s 2017 election and has close ties to the supreme leader.

Khamenei said in a statement that he appointed Raisi to bring about a “transformation (in the judiciary) in line with (its) needs, advancements and challenges” on the 40th year of the 1979 Islamic Revolution.

“For carrying out this crucial act, I have chosen you who have a long track record in different levels of the judiciary and are in touch with its nuances,” he said in the statement.

He called on Raisi to be “with the people, the revolution and against corruption” in his new role.

Raisi takes over from Sadegh Amoli Larijani who was in December appointed chairman of the powerful Expediency Council.

Raisi is a mainstay of the conservative establishment, having served as attorney general, supervisor of state broadcaster IRIB and prosecutor in the Special Court for Clerics.

He bears the title of Hojjat al-Islam, which is a rank under Ayatollah in the Shiite cleric hierarchy.

Raisi became deputy prosecutor at the Revolutionary Court of Tehran during the 1980-88 Iran-Iraq war. 

Human rights organisations, opposition members and dissidents have accused the tribunal of overseeing the execution of political prisoners without due legal process during his tenure.

He was chosen by Khamenei in 2016 to head Iran’s Imam Reza Shrine and lead its huge business conglomerate, Astan Qods Razavi, with interests in everything from IT and banking to construction and agriculture.

During his 2017 campaign, Raisi took a tough line on Rouhani’s “weak efforts” in negotiating the 2015 nuclear deal with world powers that brought the Islamic republic sanctions relief in exchange for limiting its nuclear programme.

US President Donald Trump last year withdrew Washington from the pact and reimposed sanctions on Tehran.