There are no booths in Iranian polling stations, and voting often turns into a communal activity.
There are no booths in Iranian polling stations, and voting often turns into a communal activity as people discuss their choices openly and help each other fill out the forms, which must be written by hand.
As well as picking a president between incumbent moderate Hassan Rouhani and hardliner Ebrahim Raisi, they also had to select 21 local councillors.
For the first time, Iranians rushed to the polls early in the morning, saying they were keen to encourage as high a turnout as possible.
"We came early to encourage others to come. We've taken pictures of ourselves and put them on social media," said Mansoureh, a 45-year-old university lecturer.
Many carried lists of councillors advised by reformists or conservatives on their mobiles and helped elderly people fill out their ballots.
A group of women, with the loose and colourful headscarves of more liberal Tehranis, searched for Rouhani's code on the board, lost among the posters for the 2,700 council candidates.
Some were dressed up for the occasion, with one man looking particularly dapper in bow tie and dinner jacket, while a newly married woman even showed up in her wedding dress.
At one of the biggest mosques, the Hosseinieh Ershad, a friendly debate was going on between an elderly Rouhani supporter and a young clerical student backing Raisi.
"Outside Tehran, people are having a really difficult time, and our foreign policy should have more authority," said the cleric, a 20-year-old called Morteza.
The elderly man politely responded that Rouhani was right to cut back on subsidies, fix the country's finances and invest in infrastructure.
Nearby, a woman scolded another voter in line for wearing purple, which was Rouhani's campaign colour.
"This is very bad. You are telling people who you are voting for -- they could invalidate all our votes from here!" she cried.
A distinction exists, it seems, between discussing your ballot with friends and advertising your choice to the world.
With the turnout looking far bigger than last year's parliamentary election, thousands joined a group on popular messaging app Telegram in a bid to locate polling stations with smaller queues.
At a Tehran school, excitement broke out when one of the candidates, reformist Mostafa Hashemitaba, showed up to vote, waiting politely in line.
In a sign of the oddities of the Iranian system, he voted for Rouhani and called on his supporters to do the same.
The Guardian Council allowed only six people to run in the election, of which four ended up operating as back-up for the main candidates.
Hamed Boroujerdi, 40, who owns a clothing store, took turns with his wife as they minded their two small children outside the school.
"We hope things don't get worse in terms of economy and politics so we voted Rouhani," he said.
Others were voting for the first time, including 51-year-old Amir Fathollahzadeh.
"I've almost lost my entire business in past years and now I want to vote Rouhani so at least I don't lose my dignity and pride," he told AFP.
He hopes Rouhani can build on his success in reducing sanctions on Iran so that he can more easily import phones and tablets.
But Mohammad Ali Serkani, 23, a student who voted Raisi along with his sister and parents, believed that protecting "Islamic culture and economy" were the most important factors.
At a nearby mosque, where men and women lined up in separate queues, there were many more Raisi supporters.
"I've always voted," said Mahanz Rafii, 50, a theology professor, wearing her head-to-toe chador robes.
"Unfortunately in recent years the dialogue of revolution has been weakened. People should restore the revolution's path."