Iranian President Hassan Rouhani earned an emphatic vote of confidence and reformist partners secured surprise gains in parliament in early results from elections that could accelerate the Islamic Republic's emergence from years of isolation.
While gains by moderates and reformists in Friday's polls were most evident in the capital, Tehran, the sheer scale of the advances there suggests a legislature more friendly to the pragmatist Rouhani has emerged as a distinct possibility.
A loosening of control by the anti-Western hardliners who currently dominate the 290-seat parliament could strengthen his hand to open Iran further to foreign trade and investment following last year's breakthrough nuclear deal.
"The people showed their power once again and gave more credibility and strength to their elected government," Rouhani said, adding he would work with anyone who won election to build a future for the industrialized, oil-exporting country.
The polls were seen by analysts as a potential turning point for Iran, where nearly 60 percent of its 80 million population is under 30 and eager to engage with the world following the lifting of most sanctions.
Millions crowded polling stations on Friday to vote for parliament and the Assembly of Experts, which selects the country's highest authority, the supreme leader. Both bodies have been in the hands of hardliners for years.
Supporters of Rouhani, who promoted the nuclear deal, were pitted against hardliners close to Supreme Leader Ayatollah Ali Khamenei, who are wary of detente with Western countries.
Rouhani and key ally and former President Akbar Hashemi Rafsanjani were leading the race for the Assembly of Experts with most votes counted, and appeared to be sure of winning seats, early results released on Saturday showed.
Until now, the contest for this seat of clerical power was an unremarkable event, but not this time. Because of Khamenei's health and age, 76, the new assembly members who serve eight-year terms are likely to choose his successor. The next leader could well be among those elected this week.
Rafsanjani is among the founders of the Islamic Republic and was its president from 1989-1997. Nearly always at the centre of Iran's intricate webs of power, the arch-fixer is famous for his pragmatism and political acumen.
Two prominent hardliners were on course to be elected with lesser scores in the experts assembly race: Ahmad Jannati was in 11th place and the assembly's current chairman, Mohammad Yazdi, was 15th. Arch-conservative Mohammad-Taghi Mesbah-Yazdi appeared unlikely to win a seat, according to partial results.
The results were initially announced as final in an official statement. A later statement said the results were partial and a final tally would be announced in due course.
A Reuters tally, based on official results published so far, suggested the pro-Rouhani camp and allied independents were leading in the parliamentary vote. Some moderate conservatives, including current speaker Ali Larijani, support Rouhani.
A breakdown of the results had independents on 44, reformists on 79, and hardliners on 106, the tally showed. A number of seats will be decided in run-offs in late April because no candidate won the required 25 percent of votes cast. Eight of the initial winners were women.
Analyst say the large number of independents may be significant as they could cooperate across ideological lines with Rouhani's government.
Whatever the outcome, Iran's political system places much power in the hands of the conservative Islamic establishment including the Guardian Council, which vets all laws passed by parliament.