So how does it all work and what happens next?
There's been a lot of will-he-won't-he about the 55-year-old Tehran mayor this year, but he finally registered on Saturday for his third run at the presidency.
It seems probable that the Pasdaran itself could produce a strong leadership figure to fill such a vacuum in the way that Gen. Reza Khan did in 1921, removing the pro-British Government of Iran. It's still a lot of candidates, though.
Iran has managed to sign a string of multibillion-dollar civilian aircraft deals since sanctions were lifted, but many ordinary Iranians are still waiting on hoped-for economic benefits of the nuclear agreement to trickle down.
Ahmadinejad's candidacy may be a stunt to ensure at least one of his acolytes makes the cut.
Mahmoud Ahmadinejad filed to run in Iran's upcoming presidential election, defying the wishes of the country's supreme leader that he not seek to return to the office.
Influential Shi'ite cleric Ebrahim Raisi, the custodian of a powerful organization in charge of Iran's holiest shrine, appears to be the leading hardline candidate in the presidential race, though some prominent conservatives have already thrown their weight behind Rouhani. In 2013, it prevented ex-President Akbar Hashemi Rafsanjani from running.
Rouhani however set conditions of peace; "the road to peace is not a one-way route and all countries should have a will to keep peace and security in the region", he said, turning to the matter at hand, Iran's improved defense capabilities. Sitting presidents in Iran are expected to be modest about their ambitions, and to refrain from using state television as a campaigning platform. That's not to say it will be easy for Rouhani. For voters, the economy matters. The council has not allowed women to run in the past. 6- Believer and committed to the Islamic Republic of Iran's fundamentals and also official religion of the country. He is also a member of Assembly of Experts, an all-cleric body that will rule on the successor for the Supreme Leader. He said he would run as an "independent" and described himself as a "soldier" of Iran. It holds elections and has elected representatives passing laws and governing on behalf of its people, though the supreme leader has the final say on all state matters.
Khamenei praised Ahmadinejad as "courageous, wise and hard-working" after his re-election in 2009, which ignited an eight-month firestorm of street protests.