Long lines formed and voting was extended on Friday as Iranians cast ballots in an election test for President Hassan Rouhani, a moderate who hopes to curb conservative dominance after a nuclear deal with world powers.

The Islamic republic’s ultimate authority, supreme leader Ayatollah Ali Khamenei, was among the first to vote and he urged the country’s 55 million-strong electorate to follow suit, as "it’s both a duty and a right".

As well as picking 290 members of parliament, voters are also selecting the Assembly of Experts, a powerful committee of 88 clerics that monitors Khamenei’s work and may choose his successor.

There were big queues at polling stations in Tehran and state television showed similar scenes in other cities, with officials speaking of high turnout, which is likely to benefit reformers.

Polls opened at 8:00 am (0430 GMT) and with many still waiting in line when they were supposed to close at 6:00 pm, the interior ministry said voters would be given an extra two hours.

Turnout in parliamentary elections four years ago was 64 per cent nationwide and 48 per cent in Tehran, and Rouhani has urged voters to flock to the ballot box this time.

Higher participation would help Rouhani and his reformist allies, after many moderate voters stayed away in 2012 in protest at the disputed re-election three years earlier of hardline president Mahmoud Ahmadinejad.

This year’s polls are especially important as they come just one month after sanctions were lifted under the nuclear accord, so the outcome will be seen as a de-facto referendum on Rouhani’s administration.

Known as the "diplomat sheikh" on account of his clerical credentials and willingness to negotiate, Rouhani was the driving force behind the nuclear deal, which he delivered despite political pressure at home.

The agreement raised hopes in Iran but the economy remains in the doldrums after a decade of sanctions that prompted a deep recession followed by high inflation.

Lawmakers are elected for four years but the assembly has eight-year terms. Should Khamenei, who is 76, die during that time its members would pick his replacement.

Khamenei smiled warmly as he presented his identity documents to electoral officials before receiving his ballot paper which he posted in a sealed box at 8:09 am.

"Everyone must vote, those who love Iran, those who like the Islamic Republic, those who love the grandeur and glory of Iran," said Khamenei, who backed Rouhani’s nuclear talks but has continued to rail against US influence.

After voting in Tehran, 67-year-old Rouhani pledged to protect the integrity of the elections as "a mark of trust".

A total of 4,844 candidates, about 10 per cent of whom are women, are standing in the parliamentary election. Only 159 clerics — a fifth of the applicants — are seeking a place on the Assembly of Experts.

Results from outside Tehran were expected within 24 hours but the vote tally in the capital, which has a population of 12 million and is electing 30 lawmakers, will take three da