Iran's president is stepping down after eight years in power – and he leaves behind a complicated legacy.
Mahmoud Ahmadinejad’s supporters say they love him for standing up to the West. Opponents say he has left the country isolated.
By ratifying another set of sanctions against Iran just three days before the inauguration of President Rouhani the US government made it absolutely clear that they are not interested in resolving the disputes with Iran, including the nuclear dispute, through dialogue and diplomacy.
On Friday, Ahmadinejad gave his last speech as President, addressing thousands of supporters in the capital. He told them he was grateful to have served them.
Iran's new president, Hassan Rouhani, will be inaugurated in Tehran on Sunday.
His election last month was met by a wave of optimism, but the challenges ahead are enormous.
Among them is the dispute over Iran’s nuclear programme. Rouhani has struck a conciliatory tone saying "We are ready to show more transparency," and "increase trust between Iran and other countries."
As a result of the standoff Iran has faced years of international sanctions. Rouhani has been candid about their effect on the economy, saying "inflation is the highest in the region, and perhaps in the entire world.”
Iran is also deeply entrenched in the Syrian conflict. And Rouhani insists that he will continue to support the Syrian government. But he has offered to mediate between President Bashar al-Assad "and those in the opposition who strive for democracy".
Will Iran's new president usher in the start of a new era? Or is he likely to bring more of the same? And what is Ahmadinejad's legacy?
Inside Story, with presenter Hazem Sika, is joined by guests: Meir Javedanfar, the co-author of The Nuclear Sphinx of Tehran: Mahmoud Ahmadinejad and the State of Iran; and Ghanbar Naderi, a journalist with the Iranian state-run newspaper, Kayhan International.
"Did sanctions lead to President Rouhani being elected? I think President Ahmadinejad's distractive policies plus the isolation that they produced, plus the massive economic damage that Ahmadinejad's mismanagement and sanctions produced put all together created such an economic problem for the Supreme Leader that he needed to allow Mr Rouhani to be eleceted. I don't think Rouhani was his candidate ... but I think unlike 2009 this time Ayatollah Khamenei allowed the candidate to actually win and Mr Rouhani was elected. His biggest task is going to be to sort out the economic problems of Iran which are very, very large, which are very challenging. I don't think anybody can expect him to solve them within a year or even two or three years - this is going to take a long time. And through that it will probably entail improving relations with the West because without that it's going to be extremely difficult to improve Iran's economic performance under the current regime of sanctions."
- Meir Javedanfar, author