“I think Ahmadinejad is someone who has profound delusions of grandeur, someone who is not content playing second fiddle to the Supreme Leader,” says Karim Sadjadpour of the Carnegie Endowment in Washington DC.
“He sees himself as a revolutionary and a visionary leader… This smack-down of Ahmadinejad was somehow inevitable because Ahmadinejad was not content with merely being a president.”
The fight between the president and the supreme leader has broken out because the two men have different visions for the future of Iran.
Ali Khamenei wants to preserve the Islamic Revolution – exactly as Ayatollah Khomeini bequeathed it to him more than two decades ago.
But Mr Ahmadinejad wants to change it. He and his allies want to take power away from the clerics.
But in Iran, there is only room for one ultimate decision-maker. That is the supreme leader – not the president.
Ayatollah Ali Khamenei has a long-lasting alliance with the Revolutionary Guard, the military force which protects the Islamic Revolution. This alliance forms the bedrock of the Supreme Leader’s power.
The parliament takes the side of the ayatollah and the Revolutionary Guard.