In 1988, Hossein Mortazavi Zanjani was the head of Tehran's notorious Evin prison, where hundreds of political prisoners were secretly executed following an order by the founder of the Islamic republic, Ruhollah Khomeini.
Decades later, Mortazavi has taken to social media to publicly express "shame" over the killings, although he denied any direct involvement in them.
An estimated 5,000 prisoners were executed in prisons, including Evin, the country's largest detention facility, during the summer of 1988. Many of the victims were members of the Mujahedin-e Khalq Organization (MKO), an exiled armed opposition group, leftist parties and groups, and students.
"I'm ashamed, and...I want to express shame.... They killed kids, they made families mournful," Mortazavi said during a series of recent discussions on the popular app Clubhouse, where he also took questions from the audience, including relatives of some of those executed.
The reason for Mortazavi's unprecedented comments is not clear. He said he decided to speak up to warn people about the rising number of executions in Iran, where more than 200 people have been hanged so far this year.
But several former political prisoners accused him of trying to wash his hands of responsibility. Many Iranians on social media said Mortazavi should be put on trial, while others praised his apparent remorse over the executions committed in the 1980s, one of the darkest chapters in Iran's recent history.
During his discussions on Clubhouse, which were attended by thousands of users, Mortazavi repeatedly denied that he was trying to clear his name.
"We had the responsibility for [taking care of] the prisoners, even though we were not involved in the execution of their sentence. I should have left, but I was there until [the last minute]," said Mortazavi, who also served as the head of the Gohardasht prison in Karaj, a city outside Tehran, for several years.
Mortazavi maintained that he did not have a say in the executions and was left in the dark about which prisoners would be hanged. "The decisions about the executions were made elsewhere," he said.
Mortazavi recalled having a conversation with jailed politician Fathollah Omid Najabadi the night before he was executed. "I saw Najafabadi at night. In the morning I was told he was hanged. The situation was like that then," he said.
The executions are believed to have been carried out within days of a fatwa issued by Khomeini, who declared that prisoners found guilty of "mohareb," or waging war against God, should be eliminated.
The secret fatwa was issued shortly after members of the MKO, which had aligned with Baghdad during the 1980-88 Iran-Iraq War, made a final attack on the Islamic republic.
Prisoners were sent to their deaths following interrogations that lasted just a few minutes, according to rights groups.
"Their thinking was that those opposed to the Islamic republic should be executed," said Mortazavi, noting that the authorities were aiming to purge the prisons of opponents of the clerics who came to power following the Islamic Revolution in 1979.
Mortazavi directly implicated Iranian President Ebrahim Raisi in the killings. He claimed that Raisi, who was then deputy Tehran prosecutor, told him that he had received an order from Khomeini to execute prisoners.
Activists and rights groups have said that Raisi was a member of the so-called "death committee," which interrogated prisoners about their religious beliefs and political affiliations and decided who would live or die.
Mortazavi, who said he used to be a committed supporter of Khomeini, also denounced the clerical establishment, saying it had plunged the country into misery.
Mehdi Aslani, a political prisoner who survived the executions, accused Mortazavi of withholding key details about the mass killings. He also claimed that the former prison official was trying to downplay his own role in the executions.
"In 1986, he played the main role in the severe repression of prisoners during which one MKO prisoner lost his eye. That's his background in the Islamic prison system," Aslani told RFE/RL's Radio Farda.
"Without any doubt, Mortazavi and others like him should be given an opportunity to speak so that we can complete this puzzle. But he covered up so many issues that he could have unveiled," said Aslani, who recalled seeing Mortazavi in Gohardasht prison.
Faraj Sarkouhi, another former political prisoner, said Mortazavi should be put on trial. "An individual who has been involved in human rights abuses is not a normal person with whom you can gather signatures against executions," the Germany-based activist and journalist said during a Clubhouse discussion attended by Mortazavi.
Roya Boroumand, executive director of the Abdorrahman Boroumand Center, a Washington-based human rights organization that has documented the prison executions, told RFE/RL that Mortazavi was "an important eyewitness" to the mass killings.
But she added that his message was "that of a politician with an agenda rather than a repenting former official interested in truth telling or in alleviating the pain of families and survivors."
"Some of his statements were useful as they undermine the official narrative on, for example, the fact that prisoners had rioted and were dangerous. He clearly denied the existence of such riots," Boroumand noted.
"All in all, I believe we should require more than generalities and misplaced morality lessons from former officials to take them seriously," she said.