Iranian state TV said on Thursday that the body charged with vetting candidates has disqualified former hard-line President Mahmoud Ahmadinejad from running in next month’s presidential election.

It carried an Interior Ministry statement saying that President Hassan Rouhani has been approved to run for re-election, along with hard-line cleric Ebrahim Raisi, who is considered close to Supreme Leader Ayatollah Ali Khamenei.

Mr. Ahmadinejad, who remains a deeply polarizing figure even among Iranian hard-liners, had shocked the country by registering last week. Ayatollah Khamenei had previously urged him not to run.

Mr. Ahmadinejad was President from 2005 to 2013, and was best known abroad for his incendiary rhetoric toward Israel, his questioning of the scale of the Holocaust and his efforts to ramp up Iran’s nuclear programme.

The Guardian Council, a cleric-dominated body that vets candidates, said it had compiled a final list of candidates earlier Thursday and that the Interior Ministry would announce their names by Sunday.

Others who made the cut, according to the statement carried by state TV, include Tehran’s hard-line Mayor Mohammad Bagher Qalibaf, moderate Senior Vice-President Eshaq Jahangiri and former conservative culture minister Mostafa Mirsalim.