Ebrahim Raisi, a conservative cleric and judiciary chief, has won Iran’s presidential election, in a landslide victory that gives regime hardliners full control over all branches of the state for the first time in almost a decade.

But his success was undermined by the lowest turnout for a presidential vote in the Islamic republic’s history, with less than half the eligible voters casting ballots in an election that was considered a crucial test of Iranians’ faith in their theocratic system.

Raisi, who many Iranians believe was the favoured candidate of Ayatollah Ali Khamenei, the supreme leader, secured 17.9m votes in Friday’s election, equivalent to 62 per cent of the ballots cast.

His victory means hardliners are now at their most powerful since 2013, while reformists, who favour greater engagement with the west and the easing of social restrictions, have been pushed ever more to the margins. Most of their supporters boycotted the vote, assuming the result was pre-determined and disillusioned by what they perceive to be years of broken promises due to the regime leadership’s ideology and hardline policies.

Their frustration was exacerbated after the authorities barred leading reformist candidates from running in the weeks leading up to the poll as it became clear that Raisi had the full weight of the regime’s leadership behind his campaign.

Turnout was 48.8 per cent, and the 3.7m spoiled votes were more than those won by either of Raisi’s closest rivals. Mohsen Rezaei, a senior conservative general, garnered just 3.4m ballots, while the sole reformist candidate, Abdolnaser Hemmati, a former central bank governor, took 2.4m.

The election was held at a critical time for the Islamic republic and the region. The Biden administration is seeking to ease tension in the Middle East, which was inflamed by Donald Trump’s decision in 2018 to unilaterally withdraw the US from the nuclear accord with Iran and impose sanctions on the nation.

Raisi has said his government would continue negotiations with the deal’s remaining signatories — the UK, France, Germany, Russia and China.

But hardliners will want to negotiate on their own terms as the second and final term of President Hassan Rouhani’s centrist government ends in August.

The election of Raisi, who has headed the judiciary for the past two years and was the subject of sanctions by the Trump administration in 2019, as it targeted dozens of senior regime officials, risks complicating those talks.

Raisi’s victory means that Iran will be even more unlikely to rein in its support for militant groups across the region or curb its expansive missile programme.

President Joe Biden has promised to rejoin the nuclear agreement if Tehran falls back into full compliance with the deal. But his administration is under pressure from US politicians, Israel and Washington’s Arab partners to take a tough line on Iran’s support for militias and its missile programme.

Raisi has said domestic policies would be his priority. He faces the daunting task of reviving an economy crippled by sanctions and the coronavirus pandemic, festering social pressures and a deep sense of disillusionment with the theocratic system among many Iranians.

The schisms in society were underscored by the turnout. Iranian media reported that conservatives voted in large numbers. But those who want reform registered their disillusionment with the theocratic system by staying at home, in what pro-democracy activists described as an act of civil disobedience.

The low turnout will have undermined the popular legitimacy Iran’s leaders seek to claim from elections at a time when the gap between the regime’s ideology and policies, and the aspirations of the youthful population, is widening.

Conservative analysts said Raisi would be closer to Khamenei’s thinking than Rouhani, who wanted to use the nuclear deal to re-engage with the west before Trump imposed his “maximum pressure” campaign.

Unlike his predecessor, Raisi will not attempt to diminish the role of the powerful Revolutionary Guards, which dominate overseas military operations and control a sprawling economic empire at home.

“Raisi’s background in the judiciary tells us that he is obedient to the ones above him but very strict with those junior to him,” said a reformist politician.

Raisi has made few comments on foreign policy and has said his focus will be on boosting Iran’s industrial production and easing the economic pressures on Iranians.

Conservatives hope he will bring unity to the ruling system after Rouhani’s final term was blighted by bitter internal clashes. Trump’s hostility towards Iran emboldened hardliners who blamed the centrist government and its reformist backers for trusting the US.

But reformers worry that the hardliners’ victory will exacerbate the country’s problems and set back any lingering hopes of gradual reform.

“Reformists need to get prepared for a tough political era . . . and not to succumb to this result,” said Abbas Abdi, a reformist commentator.