The president is elected for four years and can serve no more than two consecutive terms. The constitution describes him as the second-highest ranking official in the country. He is head of the executive branch of power and is responsible for ensuring the constitution is implemented.
In practice, however, presidential powers are circumscribed by the clerics and conservatives in Iran's power structure, and by the authority of the Supreme Leader. It is the Supreme Leader, not the president, who controls the armed forces and makes decisions on security, defence and major foreign policy issues.
All presidential candidates are vetted by the Guardian Council, which banned hundreds of hopefuls from standing in the 2005 elections.
Conservative Tehran mayor Mahmoud Ahmadinejad became president in 2005 after he defeated former president Akbar Hashemi Rafasanjani in a second round run-off poll. Mr Rafsanjani complained of an "illegal" campaign to discredit him. Mr Ahmadinejad is Iran's first president since 1981 who is not a cleric.
Mr Ahmadinejad replaced reformist Mohammad Khatami who was elected president in May 1997 with nearly 70% of the vote. He failed to get key reforms through the Guardian Council and was hampered further after conservatives won back a majority in parliament in elections in 2004.