A court in Tehran has spared two teenagers found guilty of sexually abusing a 12-year-old boy from hanging.

US gay rights activist Michael Petrelis reports that the the judges of Branch 74 of Tehran province’s general criminal court ruled that the teenagers, Ahad and Milad, had not reached mental maturity and instead sentenced them to ten years in prison.

In front of the five judges, the teenagers first admitted that they lured the boy into a house, telling him there was a squirrel on the roof, before sexually abusing him.

The accused, who are 16 and 17-years-old, then said they did not intend to harm him, but were in an “altered mental state” when the incident occured.

They subsequently totally denied that any abuse had taken place, despite confirmation from the medical examiner that the boy had been sexually assaulted.

Ahad and Milad then maintained their innocence throughout the rest of the court’s proceedings.

Two of the judges sentenced the boys to death.

The other three noted the repeated denials of the teenagers, and their young age, and opted for a custodial sentence.

They ruled that the boys were too mentally immature to be aware of the seriousness of their actions.

Lily Mazahery, an Iranian-American attorney and human rights activist, told Mr Petrelis that she views this ruling and similar ones involving teenagers as a giant positive step forward in bringing civilised standards of human rights to Iran.

In 2005 Iran drew protests from around the world when two teenagers, Mahmoud Asgari, 15, and Ayaz Marhoni, 17, were publicly executed because according to the regime they were rapists.

Gay campaigners insist the boys were killed under Sharia law for the crime of homosexuality.