A man who was convicted of male on male rape when he was a minor has been executed in Iran, in what human rights groups said was a "flagrant violation" of international laws. Alireza Tajiki, 21, was transferred to solitary confinement at Shiraz's Adel Abad Prison on 9 August, a sign that his execution was imminent.

Tajiki was arrested in 2012, at the age of 15, and sentenced to death one year later for "lavat-e be-onf", which is forced male-male intercourse. However, sources close to the man said he had confessed to the crime after being allegedly tortured. He later retracted his confessions and protested his innocence, said the rights group Amnesty International.

"The authorities never approved Alireza's request for a retrial, and this is unlawful. There is a lot of ambiguity in his case file that needed clarification," Tajiki's brother told NGO Iran Human Rights (IHR).

Iran has ratified treaties that oblige the country to refrain from the death penalty for individuals convicted of crimes committed when they were under the age of 18. "Alireza Tajiki's death sentence is in violation of international convenants which Iran has ratified," Mahmood Amiry-Moghaddam, IHR director and spokesperson, said in a statement.

Amnesty International condemned the execution, adding that it was the fourth of a person arrested as a child to occur this year. "Alireza Tajiki's execution, which was carried out despite his allegations that he was tortured into 'confessing', consolidates a horrendous pattern that has seen Iran repeatedly send people arrested as children to the gallows, often after deeply unfair trials," Magdalena Mughrabi, Amnesty 's deputy Middle East and North Africa director, said.

"This execution is a flagrant violation of Iran's obligations under the UN Convention on the Rights of the Child, which it ratified two decades ago."

The Islamic republic allows capital punishment for juveniles in case of "qesas" (retribution-in-kind) and "hodoud", offences and punishments for which there are fixed penalties under Islamic law.

Following mounting pressure by the international community, Iran introduced some amendments to its penal code in 2013, allowing judges to replace the death penalty for children if they do not understand the nature of the crime or its consequences, or if there are doubts about their mental capacity.

However, responding to the UN Office of the High Commissioner for Human Rights in October 2016, the representatives of Iran said Tajiki "had sound intellect and understanding about unlawfulness of the committed acts and their punishment". Therefore, he could be sentenced to death.

Iran has long been condemned for its executions, most of which occur by hanging. Furthermore, it seems that the 2013 amendments have not heralded the changes rights groups had hoped for.

"In January alone, two young men arrested as children were executed, according to human rights groups, and at least 49 more child offenders remain in imminent danger of execution," Human Rights Watch said in February.

As of August 2017, there are at least 89 individuals on death row who were under the age of 18 when the crime was committed, Amnesty said.

Iran's handling of juvenile offenders' executions was under the spotlight again in 2015, with the high-profile case of Saman Naseem, a 24-year-old Kurdish man sentenced to death in 2013, at the age of 17 .

Naseem's whereabouts remained unknown until 2015, when he wrote a letter from prison, in which he described the torture practices he was allegedly subjected to while in detention. His execution was scheduled for February 2015, but it was not carried out.

His case prompted the international community to once again criticise Iran. It is not clear whether Naseem has been executed since his letter was published by Amnesty in 2015.