Newsbeat's guide to... Mahmoud Ahmadinejad
Iran's 2009 presidential election caused massive protests against the disputed re-election of Mahmoud Ahmadinejad and a violent crackdown against the crowds.
With the controversial president now heading out of office after reaching his two-term limit, Iranians are going to the polls once again on Friday.
Who is Mahmoud Ahmadinejad?
Mahmoud Ahmadinejad is the sixth president of Iran.
He has been in power since 2005 and has served two terms as president.
The son of a blacksmith, Ahmadinejad was a teacher and engineer and was not widely known outside Iran when he entered the presidential election campaign.
His only previous political role was as mayor of Tehran, where he made his name as a populist politician.
When he became president, he claimed to be a man of the people by referring to his own modest life and promised to "put the petroleum income on people's tables" - meaning Iran's oil profits would be distributed among the poor.
How is he viewed outside Iran?
Ahmadinejad is seen as a controversial figure both inside and outside Iran.
He took a strong stance against the west, in particular against America, the UK and Israel. Iran's relations with the west have soured dramatically.
In October 2005, he called for Israel to "banish from the page of time" and has described the Holocaust as a "myth".
He has been a strong supporter of accelerating Iran's nuclear program which many countries see as a security threat.
Iran's production of uranium, an element that can be used to make nuclear weapons, has increased.
Ahmadinejad has said its uranium is for peaceful purposes, but many countries do not believe that to be true.
UK Foreign Secretary William Hague says Iran's actions are "provocative" and there have been international sanctions to stop it.
What are the sanctions?
Some of the restrictions target the country's economy, while others make it harder for Iran to get hold of nuclear equipment.
The sanctions have had a huge effect in Iran.
The currency has weakened and this has brought hardship to many Iranians.
The presidential elections in 2009 led to protests in Iran as people didn't think that Ahmadinejad had won the election fairly.
Many demanded a re-run and there was a government crackdown on protestors. Restrictions on the media and reduced access to internet sites like Facebook have increased.
Whoever becomes president has to work under Ayatollah Khamenei, the supreme leader of Iran.
He influences what laws are passed and controls who is elected to the top government posts, including the president.
In recent years, it is thought that he and Ahamadinejad have grown apart as Ahmadinejad wanted to bring in officials not supportive of the clerical rule.
Follow @BBCNewsbeat on Twitter