Iran elections
Officials prepare ballot boxes for Friday's presidential and city council elections in the northern Iranian city of Amol - Reuters

Iranians were heading to polling booths to elect their next president, the successor to Mahmoud Ahmadinejad, as the country's supreme leader Ayatollah Ali Khamenei lashed out at the US for questioning the credibility of the election.

"Our dear nation should come [to vote] with excitement and liveliness, and know that the destiny of the country is in their hands and the happiness of the country depends on them. I recently heard that someone at the US National Security Council said 'we do not accept this election in Iran'. We don't give a damn," said Khamenei as he cast his vote.

Officials and critics in the US, including Secretary of State John Kerry, had questioned the credibility of the election.

Polling stations opened at 08:00 local time (03:30 GMT) and will close at 06:00. The results are expected to be announced on Saturday (15 June). Nearly 50 million Iranians are eligible to vote.

Ahead of the voting, authorities ordered a crackdown on the media and activists, allegedly in a bid to avert election-related violence.

The election outcome is unlikely to drastically recalibrate the Iranian position on major international issues including Iran's contentious nuclear programme and the country's backing for Syrian president Bashar al-Assad.

Six presidential contenders are in the race of whom five are said to be loyal to Khamenei - the highest authority in Iran.

Hardliners include Iran's chief nuclear negotiator Saeed Jalili, Tehran's Mayor Mohammad Baqer Qalibaf and the veteran diplomat Ali Akbar Velayati. The only moderate contender who strikes conciliatory note is Hassan Rohani.

It is close to impossible to gauge the mood of Iranians as no reliable opinion polls are available.

The last presidential election in 2009 sparked several months of unrest in the country following complaints of vote rigging.

Some of the secular presidential candidates who fought in the previous election are still under house arrest.