Iran started counting tens of millions of votes on Saturday after hotly contested elections that could see reformists speed up Tehran's opening to the world or long-dominant hardliners reassert the Islamic Republic's traditional anti-Westernism.
The elections are the first since Tehran agreed with major powers to curb its nuclear program, leading to the removal of most of the stringent international sanctions that have paralysed the economy over the past decade.
Turnout was heavy. Polling was extended five times for a total of almost six hours, because so many people wanted to vote.
A clear outcome may take days to emerge, although conservatives normally perform well in rural areas and young urbanites are seen as favouring more moderate candidates allied to President Hassan Rouhani.
Supporters of Rouhani, who championed the nuclear deal, are pitted against hardliners close to Supreme Leader Ayatollah Ali Khameni. They are deeply suspicious of detente with Western countries, seen as adversaries implacably opposed to the 1979 revolution that toppled the Shah.
Authorities had promised that all Iranians would be able to vote and on Friday opposition leader Mir Hossein Mousavi and his wife voted for the first time since being put under house arrest in 2011.
Among other voters at a polling station in Khorasan square, a working class neighbourhood in Tehran, Mahnaz Mehri, a 52-year-old mother of four, said she was voting for reformists because they had a better vision for the economy and foreign policy.
In Meydan Beheshti square, a mainly conservative neighbourhood, Reza Ganjialilu, a 28-year-old employee at an electronics shop said he did not favour the reformists.
"I have a duty to my country. This group of people (conservatives) are the best. Our main concern is preserving our religion, ideology, not just the economy," he said.
At stake is control of the 290-seat parliament and the 88-member Assembly of Experts, the body that has the power to appoint and dismiss the supreme leader. Like the parliament, the assembly is in the hands of hardliners.
During its next eight-year term it could name the successor to Khamenei, who is 76 and has been in power since 1989.