Iranian President Hassan Rouhani, the driving force behind a 2015 nuclear deal with world powers, registered on Friday to run for re-election next month, state television footage showed.
Ahmadinejad previously said he wasn't going to run after Khamenei advised him not to, saying he would instead support his former deputy Hamid Baghaei who also registered on Wednesday.
The conservative opposition remains divided, but attention has lately focused on hardline cleric Ebrahim Raisi, 56, who runs the powerful Imam Reza charitable foundation.
He vowed to serve the Iranians, and try hard for the establishment of "justice and freedom" if he is reelected as the president.
For the time being, constant and green-friendly development, creating jobs and fighting social problems, say, poverty and addiction are among major concerns of his administration and he is determined to pace in this direction, Rouhani said.
Iran's hardline faction does not appear to be firmly behind Ahmadinejad's candidacy since it goes against the advice of Supreme Leader Ali Khamenei, but that faction would certainly benefit if either his candidacy or his electoral victory prompted the USA to undermine the nuclear deal, which has been a source of tremendous hardline animosity against the Rouhani administration.
Romine's grand slam lifts Tigers to 5-3 win over Twins
Consecutive two-out walks in the ninth put the potential tying run on base, but Eduardo Escobar flied to center to end the game. Joe Mauer added a two-run single in the third for the Twins, but that was Minnesota's final hit of the game.
Iranian hard-liners had widely hope Raisi would challenge incumbent President Hassan Rouhani.
Associated Press journalists watched as Rouhani, 68, registered on the fourth day of the allocated period which ends on Saturday evening.
At the Interior Ministry's headquarters in Tehran, Rouhani said he had fulfilled the promises he made to the Iranian people during the election campaign four years ago, EFE news cited statements published by official media outlets.
The former hardline president, Ahmadinejad, was a two-term president for 8 years, before President Rouhani took the office in 2013 election.
While the president holds executive authority under Iran's constitution, considerable power remains in the hands of Iran's supreme leader, who is considered the country's highest political and religious authority. The council normally does not approve dissidents or women. "It would be very risky to pin former President Ahmadinejad as being just a principlist... because there's a lot of the things that he has done within Iran in terms of internal policies that could qualify as being reformist".