In this Feb. 26, 2016 file photo, Iranians stand in line at a polling station during the parliamentary and Experts Assembly elections in Qom, 78 miles south of the capital Tehran, Iran. On Monday, President Hassan Rouhani of Iran and his allies appeared to have made strong gains in two national elections.

TEHRAN, Iran – President Hassan Rouhani of Iran and his allies appeared Monday to have made strong gains in two national elections, the first to be held since Tehran completed a sweeping nuclear deal with the United States and other Western powers.

Official results in Friday’s election for both Parliament and the clerical Assembly of Experts have still not been released. But it seemed increasingly likely that political moderation, Rouhani’s main promise when he campaigned for the presidency in 2013, is slowly reshaping Iranian politics.

“No more trivial debates, no more complaining of shaking hands with American officials, no more shouting and screaming from the Parliament seats,” said Farshad Ghorbanpour, an analyst with close ties to the Rouhani government. “The next Parliament will support the government, it will be reasonable and rational.”

While the hard-liners still remain firmly in control of the judiciary, security forces and much of the economy, the success of the moderate, pragmatic and pro-government forces seemed to have lent new momentum to Rouhani’s efforts to chart a course of greater liberalization at home and accommodation abroad.

In the parliamentary elections, Rouhani and the moderates swept all 30 seats in the capital and appeared to run strongly in many other urban areas. While the numbers remain hazy, pending the release of official results by the Interior Ministry, Rouhani’s camp appears to have won a strong minority position, with no dominant faction.

The moderates also did well in the other election, for the 88-member Assembly of Experts, a panel that will name the successor to Iran’s supreme leader, Ayatollah Ali Khamenei, who is 76 and has had health problems.

Ayatollah Akbar Hashemi Rafsanjani, a pragmatic former president, came in first in Tehran while Rouhani was third. A prominent conservative scholar, Mohammad Kashani, was second. Two influential ayatollahs, spiritual leaders for the hard-line faction, did not make the threshold.

The voting was seen as a referendum of sorts on the nuclear deal, and virtually every prominent critic of the pact was defeated. The results also gave some weight to President Barack Obama’s carefully couched hopes that the deal might introduce changes that could gradually bring Iran out of its confrontational posture with the West and, most pointedly, the United States.

By Monday afternoon, in the absence of official results, numbers were being thrown around freely. State television reported Sunday that the hard-liners had won, and then reversed itself Monday and gave the moderates the win.

Part of the problem was that so many candidates had been eliminated by a conservative vetting council that it was hard to know what faction some of the winners identified with.

But it seemed clear that Iran’s ailing hard-line faction, having used every weapon in its arsenal against the moderate supporters of the Rouhani government, had come up short. In addition to the disqualification of thousands of candidates, street campaigning was kept to a minimum and grass-roots activists were detained and intimidated.

When Election Day came, the president’s support base of middle-class Iranians turned out in big numbers, even though the overall turnout declined to 62 percent from 64 percent four years ago. A diverse bunch of Gucci lovers, student philosophers and family men carrying children wearing ‘‘Frozen’’ shirts, they came out for revenge against the hard-liners and appear to have exacted it.

Hard-liners, representatives of the sharper edges of Iran’s Islamic revolutionary ideology, have long had trouble attracting a large voter base. Iranian society has changed at lighting speed during the past 15 years, with the middle classes feeling more and more alienated by the harsh hard-line rhetoric against the United States, Western culture and any form of social relaxation.

Obtaining a strong minority in Parliament is not only Rouhani’s victory but also the result of a broader trend where the Iranian political discourse is shifting away from a polarized universe of hard-line versus reformist. Those supporting Rouhani prefer to call themselves pragmatists, centrists and moderates.

The victory is big, but those expecting major social change in Iran will be proved wrong, both supporters of the government and hard-liners say. Those who made it into Parliament under the banner of reforms seem mostly to be cautious politicians. The original reformist leaders, who have pleaded for radical changes in law and ideology, are either in jail or not allowed to participate in the political process.

“They will quickly face division among themselves, since the supporters of the government is a mixed bag of individuals with different political backgrounds,” said Hamidreza Taraghi, a political analyst close to Iran’s leadership. “To write off the hard-liners would be a major mistake.”

At a polling station in Shahrak-e Gharb, in western Tehran, families joined the local older men who pass the days in a neighboring park for hours of waiting before casting their ballots.

“I’m not into politics,” said Reza Sharji, a 35-year-old graphic designer with a long hipster beard. “But I do know what I don’t want, that is more hard-liners.”

Join the Conversation

We invite you to use our commenting platform to engage in insightful conversations about issues in our community. Although we do not pre-screen comments, we reserve the right at all times to remove any information or materials that are unlawful, threatening, abusive, libelous, defamatory, obscene, vulgar, pornographic, profane, indecent or otherwise objectionable to us, and to disclose any information necessary to satisfy the law, regulation, or government request. We might permanently block any user who abuses these conditions.

If you see comments that you find offensive, please use the “Flag as Inappropriate” feature by hovering over the right side of the post, and pulling down on the arrow that appears. Or, contact our editors by emailing moderator@scng.com.