When Iranian President Hassan Rouhani answered questions from media leaders at the United Nations General Assembly about the Iranian nuclear program and ISIS last week, there were only occasional brief references to the human rights situation back in Iran. When there were inquiries about three U.S. citizens being held there—a former Marine, Amir Hekmati; Washington Post correspondent Jason Rezaian; and Christian pastor Saeed Abedini—President Rouhani said the arrests should not be blown out of proportion and the judicial process must run its course.

Yet on that same day in Iran, Mohsen Amir Aslani, a prisoner of conscience, was executed in the last act of a truly Kafkaesque legal process. Aslani, 37, was hanged in Rajaei Shahr Prison in Karaj at dawn on Wednesday September 24 for committing heresy and allegedly insulting the Prophet Jonah (Yunus in the Qur’an)—the one swallowed by a “big fish”; the one that God used to teach the lesson of compassion.

On the previous day, a prison official contacted Aslani’s parents and asked them to come and visit their son one final time. Prior to this, no information about his arrest or trial was made public because his family was led to believe that by keeping quiet about his arrest, he would eventually be released. News broke about his fate only hours before the sentence was carried out, when a neighbor’s relative posted the news on Facebook and then shortly afterwards the Human Rights Activists News Agency (HRANA) reported that Amir Aslani was being kept in solitary confinement and was awaiting his execution. This was almost eight years after his arrest, and yet was the first time word of his situation became public.

Before his imprisonment, Amir Aslani was a family man who worked as a psychologist but was interested in theology and gave religious classes that looked at different interpretations of the Qur’an. This was the cause for his arrest and nine months in solitary confinement in Cell Block 209 of Evin Prison in 2006. His original sentence was four years but was initially reduced to 28 months by the appeals court until Judge Abolghasem Salavati, an infamous “hanging judge,” handed down the death penalty on new, unfounded charges.

An informed source told the International Campaign for Human Rights in Iran the day before Aslani’s execution that Aslani merely “gave classes on reading and interpreting the Qur’an and would give out his comments as booklets.” According to this source, “Many young people participated in his classes that did not meet the approval of the Intelligence Ministry, which is why he was arrested so suddenly.”

“The last time he saw his family, he told them how he was subjected to continuous physical and mental torture and was repeatedly moved between the common ward and the quarantine ward to make him believe his execution was imminent,” according to this source. “He would stay awake until five in the morning, wait for the cell door to open so they could execute him, but then several hours later they would transfer him back to the common ward. He said that each time he was tortured by the fear of his own death.”

In one of Aslani’s religious classes, he told his audience that Jonah could not have emerged from the whale’s belly and it was this statement that led to his charge of insulting the Prophet Jonah. A person close to the family told the German broadcaster Deutsche Welle that he was initially arrested for heresy.

Although the appeals court reduced Aslani’s sentence to two years and four months, new charges were also added including a so-called “forbidden act,” which was unspecified. Having been condemned to death by Judge Salavati, Amir Aslani argued that the Revolutionary Court had no jurisdiction over his case and so it was sent onto the Criminal Court in Tehran where three of the five judges considering his case upheld the death sentence. Following this, it was taken to the Supreme Court, which annulled the sentence because there was a lack of evidence and legal merit, but it was then taken back to the Criminal Court, which reinstated it.

Aslani’s lawyer objected once more and the case was sent back to the Supreme Court, which this time upheld the sentence. According to Iranian law, if the Chief Justice endorses the Supreme Court’s decision, the verdict is final, and so it was.

That is the way the judicial system in Iran runs its course.

This article is adapted from one that originally appeared in IranWire.