A grandson of Ayatollah Ruhollah Khomeini has lost his appeal against a ban from standing for election to a key clerical body in Iran this month.
Hassan Khomeini, 43, had put his name forward as a candidate for the Assembly of Experts, which is responsible for choosing the next Supreme Leader.
He is an ally of President Hassan Rouhani and seen as a reformist.
Hundreds of reformist candidates have also been barred from the elections for Iran's parliament on 26 February.
All candidates for the 88-seat Assembly of Experts and the 290-seat parliament are screened by the Guardian Council, made up of six judges elected by the conservative-dominated parliament and six clerics appointed by Supreme Leader Ayatollah Ali Khamenei.
The council decided Hassan Khomeini - a cleric of a lower rank than his grandfather - did not have "enough Islamic knowledge to distinguish the next Supreme Leader", a relative was quoted by the Isna news agency as saying.
Influential former President Akbar Hashemi Rafsanjani had endorsed Hassan Khomeini's candidacy, and was quoted by state media on Monday as saying the Guardian Council had no right to disqualify him.
On Saturday, election officials announced that the Guardian Council had reversed a decision to bar more than 1,500 candidates after reviewing their qualifications and backgrounds.
More than 7,000 of the 12,000 people who registered to stand were disqualified during the first round of vetting in December, with many not considered sufficiently loyal to the ruling system. Reformist factions said that out of the 3,000 candidates they had put forth, only 30 were approved.
Last month, President Rouhani called for more reformists to be allowed to stand, saying parliament was the "house of the people, not a particular faction".
The election comes at a time of growing rivalry between reformists and conservatives after the landmark nuclear deal between Iran and world powers that saw crippling economic sanctions against the country lifted.