ISTANBUL — Iran on Tuesday announced a list of mostly conservative or hard-line candidates for next month's presidential election, after several moderate politicians were barred from running.

Iran’s Guardian Council, which approves aspirants to elected office, narrowed the field to seven candidates from hundreds who had registered and disqualified prominent figures associated with centrist or reform-minded political factions. The seven candidates — all middle-aged men — are vying to replace President Hassan Rouhani, a centrist who is prevented by term limits from running again.

The council’s selections, which reflect the preferences of Iran’s supreme leader, Ayatollah Ali Khamenei, virtually guarantee the election of a hard-line government at a moment when Tehran is trying to revive a tattered nuclear deal with six world powers, roll back U.S.-imposed economic sanctions and mend relations with neighbors such as Saudi Arabia.

The lack of ideological diversity among the presidential candidates will probably also suppress turnout in the election, raising questions at home and abroad about the legitimacy of the vote, analysts said. The election will be held on June 18.

One of the candidates, Ebrahim Raisi, a conservative cleric who heads Iran’s judiciary, is widely viewed as the front-runner and the consensus choice of Iran’s hard-line factions. Raisi, who unsuccessfully ran for president four years ago, is also seen as a possible successor to Khamenei. He has been linked by human rights groups to mass killings of dissidents in 1988, when he served on a panel involved in sentencing prisoners to death.

Two people who were barred from the election were regarded as among a few figures with the stature to challenge Raisi: Ali Larijani, a center-right former parliament speaker and nuclear negotiator, and Eshaq Jahangiri, a reformist and Rouhani’s vice president.

Their disqualifications prompted criticism that the 12-member Guardian Council was anointing Raisi, rather than merely approving a slate of candidates. Half of the council’s members are clerics appointed by the supreme leader, and the other half are jurists nominated by the head of the judiciary. Raisi, as the head of the judiciary, nominated three of the council’s members.

Jahangiri said in a statement that he views “the disqualification of many worthy people as a serious threat to public participation and fair competition of different political parties and movements, especially the reformists.”

Sadegh Larijani, a cleric who serves on the Guardian Council and is a brother of Ali Larijani, issued a sweeping condemnation of the council’s selections. He has defended the body for 20 years, he wrote on Twitter, “but I have never found the decisions of the council so indefensible.”

Mahmoud Ahmadinejad, a hard-liner who served two four-year terms as president from 2005 to 2013, also was excluded from the final list of candidates.

The aspirants allowed to compete in the election include Mohsen Rezaei, a former Revolutionary Guard Corps commander who has mounted several unsuccessful presidential campaigns; Saeed Jalili, a hard-liner and a former nuclear negotiator; and Abdolnaser Hemmati, the governor of Iran’s Central Bank. The sole reformist candidate, Mohsen Mehralizadeh, is a former governor of Isfahan province with little national standing.

Iran’s elections are often vigorously contested — with candidates from across the political spectrum registering to run — but hardly fair. The process is tightly managed by the country’s conservative leadership using mechanisms such as vetting by the Guardian Council and control of state media to shape the outcome.

The list announced Tuesday was latest sign of a determined effort to prevent reformists from securing any surprise victories at the polls, as happened in 1997, when Mohammad Khatami, a pro-reform cleric, won the presidency, and in 2013, when Rouhani was first elected to office.

Winnowing the field of candidates before the election is one way of accomplishing that goal.

“The regime is somehow losing its risk appetite, as is evident from these candidates,” said Mahmoud Pargoo, the lead author of “Presidential Elections in Iran” and a research fellow at the Alfred Deakin Institute for Citizenship and Globalization at Deakin University in Victoria, Australia. “This simply shows the regime feels very threatened from elections and it doesn’t feel secure enough to have some kind of serious contest.”

Iran’s reformists were losing popularity even before the state’s latest attempts to block them from the presidency. One reason was President Donald Trump’s withdrawal from the 2015 nuclear deal and his reimposition of sanctions, which were a “huge setback for moderates,” Pargoo said. Rouhani’s administration has also been faulted for its stumbling response to the coronavirus pandemic.