Moderate cleric Hassan Rouhani unofficially became President of Iran today after Supreme Leader Ayatollah Ali Khamenei endorsed him, state media reported.
Khamenei kissed Rouhani on the cheek and the new president kissed the leader on his lapel during a ceremony in Tehran.
The start of Rouhani's presidency brings an end to Ahmadinejad's eight years in office during which Iran grew more isolated and came under wide-ranging United Nations, US and European Union sanctions over its nuclear programme, putting enormous pressure on the economy.
Rouhani's resounding election win in June has increased hopes of a negotiated end to the dispute over Iran's nuclear programme, which could avert a potential new war in the Middle East.
Rouhani will face huge tasks in office, including combating inflation he put last month at 42 percent, reducing high levels of unemployment and bridging the political divisions between conservative, moderate and reformist factions.
When he registered for the 2013 presidential election, he pledged to prepare a civil rights charter, restore the economy and repair relations with the West.
But his first challenge will be persuading parliament to approve the candidates he has chosen for cabinet positions, which he is expected to introduce on Sunday during his public inauguration.
"Rouhani will certainly appoint more competent men and women to key economic ministries and institutions. He will also follow saner economic policies," said Shaul Bakhash, an Iran historian at George Mason University in Virginia.
"But the economic problems are staggering ... Above all, without a serious easing of sanctions, it is difficult to see how Rouhani can get the economy moving again."
Additional reporting by agencies