Iranians voted Friday in parliamentary elections made easy for conservatives after sweeping bans that left many pro-reform candidates off the ballots, adding further political pressures on Hassan Rouhani, Iran’s pragmatist president.

The elections once had the potential to be a bellwether between Rouhani’s relatively moderate views — which helped pave the way for a nuclear accord with world powers — and hard-liners who oppose him.

But with only a limited number of moderates and reformers on the ballot, analysts say the elections are unlikely to foreshadow a history-making moment of change in Iran.

The elections — the first since a nuclear deal lifted most of the international sanctions that had hobbled economic growth — are being closely watched nevertheless.

“Our enemies have their covetous eyes trained on Iran,” said Ayatollah Ali Khamenei, the country’s supreme leader, according to state television. “People are advised to vote with discretion and foresight and disappoint the enemies.”

An Iranian cleric shows his inked finger after casting his vote in Tehran. (Abedin Taherkenareh/EPA)

After several extensions of polling hours — common in Iranian elections — polls closed at 11:45 p.m. Friday (3:15 p.m. EST), more than five hours later than originally scheduled, state TV reported. The extensions were intended to accommodate large numbers of voters waiting to cast ballots, it said.

Though opposition activists called the elections a sham, the vote totals could open a small window onto the Iranian appetite for change and Rouhani’s political future.

“It will be a major loss for the Iranian nation” if reformists do not win, former president Ali Akbar Hashemi Rafsanjani, who left office in 1997, told Reuters news agency.

Many Western officials hoped the nuclear deal’s implementation in January would pave the way for Rouhani to introduce measures granting civil liberties and less Internet censorship, as he promised when he was elected in 2013. Now the best-case scenario is that urbanized voters in Tehran give Rouhani a small but strong minority to support economic reform.

[Obama: Iran nuclear deal, prisoner release show the power of diplomacy]

“At the end of the day, it’s going to be seen as a referendum on Rouhani’s policies,” said Trita Parsi, president of the National Iranian American Council (NIAC), who is writing a book about the nuclear deal. “We’ll see how many people back Rouhani, mindful of the fact he hasn’t delivered on opening up society, on civil rights or human rights.”

At stake are 290 seats in the parliament, or Majlis, an institution with limited powers but capable of blocking initiatives from the president’s office. There are 6,200 candidates, but that is barely half the number who initially registered to run.

A hard-line body known as the Guardian Council disqualified more hopefuls than ever before in the 37 years since the Islamic revolution.

Nine moderate parties estimated that only 1 percent of the 3,000 reformist candidates who registered were permitted to run. Among those rejected were three dozen current members of parliament.

On the ballot are more female candidates than ever in a country where only 49 women have served in parliament since 1979. This time, 584 women are running, though about 800 were disqualified.

The election also will determine the Assembly of Experts, a uniquely Iranian council of 88 mostly elderly clerics who are nominally charged with selecting the next supreme leader if the ailing, 76-year-old Khamenei dies in the next eight years of the assembly’s term. That candidate list also has been culled. Hassan Khomeini, a grandson of the founder of the Islamic republic, was disqualified because he is close to reformist politicians.

Results are expected Saturday.

Parliamentary elections in Iran rarely alter the country’s fundamental policies.

“Voters have the option to choose different shades of status-quo conservatives along with some meek reformists,” said Karim Sadjadpour, an analyst with the Carnegie Endowment for International Peace. “The results of the supreme leader’s latest medical checkup will likely prove more consequential to Iran’s political future than the results of the Majlis elections.”

Despite having the odds against them, the moderates and reformers are campaigning to make the election as competitive as possible. They have used social media to disseminate a list of 30 reformist candidates they endorse for parliament and 18 for the Assembly of Experts. They are calling the alliance of reformists and moderates the “Second Step,” to build on Rouhani’s reforms.

“The point they are making, in order to increase voter participation, is that voting hard-liners out at this juncture will send a powerful message of popular sentiments in support of the country’s redirection since 2013,” said Farideh Farhi, a Middle East scholar at the University of Hawaii.

Conversely, a poor performance at the ballot box would be a huge setback for the already weak reform movement.

“If [conservatives] win, having been given a leg up by the unfair electoral system, it will also be a powerful message that they have the means and instruments to create obstacles for Rouhani’s redirection of the country,” Farhi said.

Khamenei has sent out mixed signals to voters about the importance of voting. Last month, the supreme leader urged even citizens who do not approve of his leadership to take part at the country’s 60,000 polling places. More recently, however, he rallied conservatives by warning that the West is plotting to influence the contest and predicted Iranians would vote in favor of maintaining an anti-West posture.

[International sanctions against Iran lifted]

“The system has an incentive to say large numbers of people voted,” said Ray Takeyh, a Middle East scholar at the Council on Foreign Relations. “Iran likes to control elections, but it also likes a large turnout to legitimize the system.”

If most of the moderates up for office win seats, that could make it easier for Rouhani to open up the economy to foreign investment. But conservatives refer to reformists as “seditionists,” and their small numbers ensure that Rouhani is unlikely to get enough backing for most of his goals.

“Could some of the centrists come to power? It’s possible,” said Alireza Nader, an analyst at the Rand Corp. “But the conservative establishment will not allow Rouhani to use parliament as a basis for reforms. The reformist movement in Iran is very weak. It’s not willing to do things that really challenge the system.”

Politics in Iran are complex and do not simply pit hard-line conservatives against liberal reformers. Some conservatives in the parliament have backed Rouhani’s attempts to liberalize the economy. The supreme leader, who has the final say in all important government decisions, signed off on the nuclear deal but has ruled out a rapprochement with the United States.

“What most of us are looking for is whether or not the reform movement can stage any kind of meaningful comeback,” said Suzanne Maloney, an Iran analyst at the Brookings Institution, “whether there will be an alignment between reformists — those still allowed to participate — and more moderate conservatives.”

Timing works in Rouhani’s favor. He faces high expectations that the nuclear deal negotiated by his administration and implemented Jan. 16 will bring broad prosperity.

“The fact Implementation Day was so close to the elections is to Rouhani’s benefit,” said Parsi, of the NIAC. “If Implementation Day had happened four months ago, people would be saying: ‘It’s been four months. Why aren’t I rich already?’ ”

Susan Hogan and Brian Murphy in Washington contributed to this report.

Read more:

The key moments in the long history of U.S.-Iran tensions

Today's coverage from Post correspondents around the world