Iran's President Hassan Rouhani secured a more moderate parliament Monday after elections saw hardliners soundly trumped by reformists while conservatives lost seats and voters implicitly backed the government.
Final results showed seats being shared three ways between Rouhani's reformist and moderate allies, conservatives and independents.
No single group had a decisive share of parliament's 290 seats from Friday's voting, but tallies suggested the president would be able to muster support from key backers and create a working majority.
The returns were shaping up as a strong signal of public support for last year's nuclear deal between Iran and world powers, an agreement steered by Rouhani which saw the lifting of crippling sanctions in January.
Friday's second election -- for the clerical Assembly of Experts -- also produced symbolic gains for Rouhani.
Two renowned hardline ayatollahs lost their seats on the 88-member assembly, a powerful committee that monitors supreme leader Ayatollah Ali Khamenei's work and will pick the 76-year-old's successor if he dies during its eight-year term.
In contrast, 15 of 16 members of the assembly's list in Tehran headed by Rouhani and his top ally Ayatollah Akbar Hashemi Rafsanjani, a two-term former president, were elected.
Rafsanjani came first and Rouhani third. A push by their supporters, largely on social media, helped eject current assembly chair Mohammad Yazdi and the ultraconservative Mohammad Taghi Mesbah-Yazdi, formerly a close adviser to ex-president Mahmoud Ahmadinejad.
The most dramatic change was the resurgence of the reformists, a political camp largely silenced after a disputed election in 2009 saw Ahmadinejad re-elected.
That vote was followed by bloody street protests in which dozens of people were killed in what is widely considered the Islamic republic's darkest hour.
Reformists swept the capital, and in an electoral first did so without requiring a second round of voting in any of the 30 seats they secured.
After campaigning as the "List of Hope", a slate of reformist politicians who support the government will regain significant power in parliament and are likely to push for social, cultural and political reforms.
Reformists stayed away from parliamentary elections four years ago in protest at Ahmadinejad's earlier victory, with defeated candidates Mir Hossein Mousavi and Mehdi Karroubi, who remain under house arrest, alleging the vote was rigged.
Results from other cities also had conservatives losing seats, but they continued to enjoy strong support in rural areas.
The main conservative list secured 103 MPs, reformists and moderates from the List of Hope 95, and Independents 14.
Some 69 constituencies had no clear winner, meaning a second round run-off will be needed in a field that has more conservatives than reformists and moderates.
Many of those conservatives already elected are moderates who backed Rouhani on the nuclear deal and, acutely aware of the public's shifting mood and desire for more openness to the West, are likely to support the government.
Such a spirit of cooperation came from Ali Larijani, a conservative and parliament's current speaker, who described the election as "eye-catching" and said it signalled that "a new page had been opened for the country".
Larijani's political heft was crucial to the nuclear deal being approved by MPs as he had backed Rouhani at key moments in the more than two years of negotiations that led to the agreement.
The results represent "a reaction against radicals" from the electorate, Amir Mohebbian, an analyst with close links to politicians of all political hues, told AFP.
"But mistakes by the conservatives who supported radicals during the campaign were also to blame" for their losses, he said.
The elections were seen as a crucial indicator of the future direction Iranians want for their country. From a population of almost 80 million, 62 percent of its 55 million electorate voted.
Khamenei himself stressed their importance ahead of the elections, urging the electorate to participate in both polls.
Although Rouhani secured the nuclear agreement last July, ending a 13-year standoff over Iran's atomic ambitions, and sanctions were lifted last month he has so far been unable to deliver significant domestic changes.
Support from reformists in the next parliament should make that easier, but the resurgent group is also likely to pressure the president for change and concrete progress on long-avoided difficult issues such as demands to free political prisoners, which could lead to conflict with conservatives.