Iranian reformists and relative moderates who support last year's nuclear deal won the most seats in parliament and a clerical body charged with selecting the next supreme leader in a major setback for hard-liners who opposed the agreement, official election results showed Monday.

Final results released by the Interior Ministry and broadcast on state TV show that reformists, who favor expanded social freedoms and engagement with the West, and other backers of President Hassan Rouhani, won at least 85 seats. Moderate conservatives -- who split with the hard-line camp and support the nuclear deal -- won 73, giving the two camps together a majority over hard-liners in the 290-seat assembly.

Hard-liners won just 68 seats, down from 112 in the current parliament. Five seats will go to religious minorities, and the remaining 59 will be decided in a runoff, likely to be held in April.

While none of the country's three main political camps will dominate the next parliament, the assembly will be much friendlier to President Hassan Rouhani, a moderate elected in 2013 on pledges to relax restrictions on freedom of expression and improve ties with the West.

The parliament vote isn't expected to herald large-scale change in Iranian policies, and it's extremely unlikely that the winners will propose structural changes to reduce the role of Islam in government or law. The condition for them to run in the election was to remain loyal to the principles of the Islamic Republic.

But reformists and moderate conservatives are expected to work together -- at least on economic issues -- and the next parliament will be far friendlier to Rouhani, making it more likely he can also deliver on promises to promote social freedoms.

U.S. officials had expressed hope that last year's landmark agreement, which lifted international sanctions in exchange for Iran curbing its nuclear activities, might pave the way for greater cooperation with Tehran on other regional issues. The strong showing by reformists and other relative moderates makes that more likely.

Moderates also won a 59 percent majority in the Assembly of Experts, an 88-member body which will choose the successor to Ayatollah Ali Khamenei, who has been Iran's top decision-maker since 1989. The 76-year-old underwent prostate surgery in 2014, leading to renewed speculations about the state of his health.

Rouhani and former President Akbar Hashemi Rafsanjani, both considered moderates, retained their seats in the assembly.

However, several prominent hard-liners, including Ayatollah Ahmad Jannati, were also re-elected. Jannati is the leader of the Guardian Council, an unelected, constitutional watchdog that vets election candidates, and has been a leading opponent of democratic reforms.

He has also led efforts to disqualify reformist candidates. Out of 3,000 reformists who applied to run in this year's elections, just 200 made it through the vetting process.

The Assembly of Experts is elected every eight years. Moderates previously held around 20 seats in the assembly.

Perhaps the most surprising result of the election was the loss of seats in the Assembly of Experts by two prominent hard-liners: Ayatollah Mohammad Yazdi, the current head of the assembly, and Mohammad Taqi Mesbah Yazdi, considered the spiritual leader of hard-liners.

Rouhani and his allies likely benefited from last month's implementation of the nuclear agreement, which lifted crippling sanctions that have been in place since 2012.

But analysts said the election results were also driven by domestic factors, including lingering anger at President Mahmoud Ahmadinejad, Rouhani's hard-line predecessor. Ahmadinejad repeatedly clashed with the West over his dramatic expansion of the nuclear program, his questioning of the scale of the Holocaust and his predictions of Israel's demise.

His policies led many conservatives to break with hard-liners, and the moderate conservatives' support for the nuclear talks and subsequent agreement widened the rift.

"Hard-liners were defeated because most of their candidates were Ahmadinejad loyalists, annoying their former allies," said Abbas Abdi, a political analyst aligned with the reformist camp.

But Saeed Leilaz, another prominent analyst, said Rouhani has convinced powerful institutions within the ruling system that serious changes are needed to lift Iran's isolation and shore up its economy, which has suffered from years of sanctions.

"In addition to fellow reformists, moderate conservatives will be an asset for Rouhani to pursue his domestic agenda, including social and economic reforms," he said.

"A friendlier parliament will also help Rouhani pursue his policy of constructive engagement with the West without the same degree of hostility he faced in the outgoing parliament," he said.

Reformists last rose to power in 1997 with the election of President Mohammad Khatami and secured a majority in parliament three years later. But the pendulum soon swung back toward hard-liners, who dominated Iranian politics from 2004 until Rouhani's election nearly three years ago.

Khamenei, who makes all final decisions on major policies, insists he is above the political fray. But the supreme leader remains deeply suspicious of the West and has warned that too much openness to Western influence could dilute the country's Islamic values.

Washington and Tehran severed diplomatic relations after Iran's 1979 revolution. They remain deeply divided on a host of regional issues, including Tehran's support for Syrian President Bashar Assad and militant groups like Hezbollah and Hamas, which are committed to Israel's destruction.