In pictures: Iranian voters go to the polls

A look at some of the main candidates and the voting in Iran's first presidential election for four years.

Ballots are being counted in Iran's presidential election to choose a successor for Mahmoud Ahmadinejad.

Voting was extended until late into the evening to cater for the long queues that had formed outside many polling stations.

These men in Qom had their identification papers ready to receive their ballot papers. In some areas voters had to queue in sweltering summer temperatures.

Many observers were surprised by the apparent enthusiasm with which Iranians turned out at polling stations. In the poorer south of the capital, Tehran, queues were particularly long.

Tehran has been covered in posters promoting the various presidential and municipal candidates. Some 50 million Iranians are eligible to vote. The decline of the national economy dominates election issues.

Not many Iranians doubt that real power lies with the Muslim establishment, symbolised by Supreme Leader Ayatollah Ali Khamenei. He called for a large turnout but did not publicly state his preference for any single candidate.

Many Iranian women have expressed hopes that the election will bring them freedoms and job opportunities denied during the eight years of Mahmoud Ahmadinejad's presidency.

The Mayor of Tehran, Mohammad Badher Qalibaf, is one of the six presidential candidates. He is a former Revolutionary Guard commander and veteran of the Iran-Iraq war.

Well ahead in early counting is the only remaining moderate candidate, Hassan Rouhani. His supporters are optimistic, given divided conservative ranks and the fact that the only other moderate contender recently pulled out of the race. Mr Rouhani, a cleric, has called for greater media freedom and more engagement with the West.

The campaign of Saeed Jalili, Iran's top nuclear negotiator, has been considered a strong one. His slogan, chanted by supporters, is: "No compromise; no submission." Considered a hardliner, he is believed to have backing from many in the ruling theocracy.

One man waiting to cast his ballot in a long queue in Qom, 120km (75 miles) south of Tehran, told the BBC: "I think the one who can resist our enemies and defend our interests will be elected by the people."

Members of the big Iranian diaspora have been voting at diplomatic missions around the globe, including here in Washington DC.