(Reuters) - President Hassan Rouhani, a pragmatist trying to open Iran after years of sanctions, and his allies carry the hopes of many Iranians for greater freedoms on Friday when the country holds elections for parliament and the Assembly of Experts.

Iran's President Hassan Rouhani speaks during a joint news conference at the Elysee Palace in Paris, France, January 28, 2016. REUTERS/Charles Platiau

Rouhani is expected to win re-election to the assembly, the body that chooses the Islamic Republic’s supreme leader. On the same day, his allies are seeking to wrest control of parliament from hardliners bent on blocking an increase in Western influence after a 2015 nuclear deal Rouhani orchestrated with major powers.

The contests have proven testy, with bad-tempered accusations traded and the mass disqualification of moderate candidates by a hardline-controlled vetting body.

Hardliners close to conservative Supreme Leader Ayatollah Ali Khamenei have accused moderates of being under Western influence, a charge Rouhani has said insults the intelligence of Iranians who, he argues, are just hungry for economic development.

“Verbal abuse, accusations and insults are beneath the dignity of the Iranian nation and the country. It is not worth it to undermine the Islamic Republic and the government for a seat in the parliament. Instead of making insults and accusations, we have to pursue higher goals,” Rouhani was quoted as saying by his website on Wednesday.

The former nuclear negotiator has a track record as a conciliator: In his 2013 election, he secured the vote of pro-reform Iranians politically muzzled for years but also drew support from some in Khamenei’s circle thanks to his impeccable background in Iran’s clerical establishment.

He hopes to repeat something of the same on Friday, bolstered by the deal with world powers under which Iran curbed activities that might have been applied to developing nuclear bombs and secured a lifting of economic sanctions in return.

Rouhani has insulated himself from hardline critics of the talks by keeping the support of Khamenei, who backed Rouhani’s efforts, although in Khamenei’s view this was purely to improve the parlous state of Iran’s economy and not to mend fences with the West.

To prevent Rouhani’s allies from being rewarded at the ballot box, however, hardline watchdog body the Guardian Council has blocked thousands of mostly moderate candidates from running in the two elections.

The assembly elected on Friday will sit for eight years and may choose the successor to Khamenei, who is 76 and rumored to be in ill health. The supreme leader wields immense power, controlling the judiciary, the security forces, public broadcasters and foundations that own much of the economy.

AN INSIDER

Rouhani, 67, has an unblemished background in Iran’s clerical establishment. Khamenei praised Rouhani’s election in 2013 as the “selection of a worthy individual who has more than three decades of service to the system of the Islamic Republic”.

He went into exile with the late founder of the 1979 Islamic Revolution, Ayatollah Ruhollah Khomenei, before the revolution and was appointed representative to the Supreme National Security Council shortly after Khamenei took power in 1989.

In that role, he presided over the talks with Britain, France and Germany that led to Iran’s suspension of uranium enrichment-related work in 2003, and resigned after hardline president Mahmoud Ahmadinejad took office in 2005.

Some analysts and officials say any success for the moderates’ in Friday’s vote could be seen as a challenge to Khamenei’s authority.

“Hardliners are worried about Rouhani’s popularity and the support he gets from moderates and people. A powerful Rouhani might harm the delicate balance of power in Iran’s political system,” said a former senior Iranian official.

On the other hand, he said, “if hardliners win more seats in the votes, they will put more pressure on Rouhani and his government to make him a lame-duck president.”

Influential former president Ayatollah Akbar Hashemi Rafsanjani, who is also running for an assembly seat, and the grandson of Khomeini, Hassan, who was barred from entering the race, are close allies of Rouhani.

Hardliners trying to preserve the status quo have tried to thwart Rouhani’s attempts to bring political pluralism at home after his success with Iran’s foreign relations.

Many Iranians who supported Rouhani’s 2013 election, meanwhile, remain frustrated, fearing that Rouhani’s focus on boosting Iran’s economy has overshadowed his promises on internal reforms and improvements in human rights.

However, “if Rouhani wants to win the 2017 presidential vote, he needs to improve the economy as well as making tangible social reforms,” said political analyst Hamid Farahvashian.