The former lawmakers' appeal was to the Assembly of Experts, a body of clerics that under Iranian law has the power to name the supreme leader and, in theory, to remove him - though such a move has never been attempted. There was no immediate response from the assembly to the group's letter, sent late Thursday.
But even if the call is ignored and is only symbolic, it was the most direct challenge to Khamenei yet in the turmoil that has embroiled Iran since its disputed June 12 presidential election. The letter breaks a major taboo among Iran's political classes against overtly targeting Khamenei, whose position at the top of the political-clerical hierarchy has long been unquestioned.
The letter, reported in opposition Web sites, came from a group of former lawmakers, most of them from the reform camp. The reports did not say how many signed the letter.
In it, they sharply denounce the crackdown, in which hundreds of protesters and opposition politicians were arrested and, the opposition says, 68 people were killed. They also denounce the trial that began this month of 100 politicians and activists accused of seeking to topple the Islamic Republic through the wave of protests that erupted over the election.
The letter calls it a "show trial" and a "Stalinesque court" and said Kahrizak prison - the facility on Tehran's outskirts where much of the abuse allegedly took place - was worse than the U.S. prisons at Abu Ghraib and Guantanamo Bay.
The former lawmakers said the supreme leader is responsible for the judicial system and the security forces who carried out the crackdown, adding that Iran's constitution underlines that "the supreme leader is on the same level as the rest of the people before the law."
The former lawmakers "demand a legal probe on the basis of Article 111 of the Constitution, which is a responsibility of the Experts Assembly," the letter said. Article 11 says that if the supreme leader "becomes incapable of fulfilling his constitutional duties," he will be dismissed.
The letter was addressed to Ayatollah Akbar Hashemi Rafsanjani, a powerful former president and cleric who heads of the Assembly of Experts. Rafsanjani has sided with the opposition in the election crisis, but accepting to investigate the supreme leader would likely be too dramatic a step for him to take. Around two-thirds of the 86-member assembly are considered strong loyalists of Khamenei and would oppose such a move.
There was no sign that opposition leader Mir Hossein Mousavi, who claims to have won the election, backs the former lawmakers' letter.
But the letter suggested how much some in the opposition have been emboldened at a time when the government and clerical leadership have been deeply embarrassed by the claims of torture and abuse against prisoners.
Security forces and the elite Revolutionary Guard harshly crushed the mass protests that erupted after the election in support of Mousavi, who clams that hard-line President Mahmoud Ahmadinejad's victory in the vote was fraudulent. In past weeks, there have been reports of young protesters who died while in prison, apparently from torture or other abuse.
This week, a top Mousavi ally, Mahdi Karroubi, went further, claiming that male and female detainees had been raped by their jailers. Parliament Speaker Ali Larijani quickly denied the allegations, saying a parliament probe into the allegations had found no truth in the reports.
During his sermon at Tehran's main Friday prayers, hard-line cleric Ayatollah Ahmad Khatami denounced Karroubi's claims as "full of libel, a total slander against the Islamic system" and demanded he be prosecuted.
"We expect the Islamic system to show an appropriate response to this," Khatami said.
In what appears to be a coordinated move, the prayer leaders in the northeastern city of Mashhad and the holy city of Qom, southeast of the capital, made similar calls Friday in their sermons, the official IRNA news agency reported.
Despite the uproar, Karroubi pressed ahead, saying he received testimonies from prisoners who recounted undergoing Abu Ghraib-like abuse and said they had seen other prisoners tortured to death.
Some detainees were "forced to go naked, crawl on their hands knees and knees like animals, with prison guards riding on their backs." Others were forced to lie "naked, on top of one another," Karroubi said in a statement late Thursday.
"Young people were beaten severely ... to death because they chanted slogans," said Karroubi, a cleric who also ran in the June 12 election. "It is deplorable that people detained over election protests are tortured. Do such treatments conform with Islam, which is a religion of mercy?"
Karroubi said the reports came from Tehran's Kahrizak prison, which has been at the center of abuse claims and was orderd closed by Khamenei this month in an attempt to ease the uproar.
Karroubi criticized Larijani's speedy denial of the rape allegations, saying no probe could have been completed that fast. He also vowed he won't remain silent over the "medieval torture and corruption" in Iran's prisons.
"Insults and criticism won't make me silent. I'll defend the rights of the people as long as I'm alive and you can't stop my tongue, hand and pen," said Karroubi, leader of the reformist National Confidence Party.