Mahmoud Ahmadinejad, the mayor of Tehran, has been elected president of the Islamic republic in their run-off election.

Ahmadinejad defeated Ali Akbar Hashemi Rafsanjani, the former two-term president who had won the first round of voting last week and was attempting to appeal to socially moderate and reform-minded voters.

Ahmadinejad's election stands to complicate Iran's gradual engagement with the West, including difficult negotiations over the country's nuclear program. The hard-liner, who won by a landslide, has expressed doubt about renewing relations with the United States.