Saudi Arabia executed 37 men in one day in one of the largest mass executions in the country's history. (Ozan Kose/AFP/Getty)

One of men executed in Saudi Arabia last week confessed to having gay sex with four other men who also faced capital punishment, according to court reports quoted by CNN.

A confession presented at the 2016 trial of the man, who was not identified in news reports, showed he admitted to having sexual relations with the four other men, as well as organising anti-government violence. His lawyer said the interrogator “invented” the confession.

The court documents quoted in CNN, which related to the trials of 25 men who were executed on April 23, read in relation to this case: “He said that he did all this because he belonged to the Shia sect and because he was against the Sunni sect, and because of his hate for the state and its men and its security forces.” The man denied the charges.

“He was subjected to psychological and physical abuse which drained his strength.” — Nader al-Sweikat

Homosexuality is illegal and punishable by death in Saudi Arabia, which adopts a strict interpretation of Sharia law.

Condemnation of homosexual acts is taught to pupils at school, as textbooks reviewed by the monitoring group Anti-Defamation League (ADL) in November were shown to promote violence against those who engage in gay sex, as well as women, Jews, Christians and Shia Muslims.

Mass execution in Saudi Arabia was one the largest in country’s history

The man was one of 14 people—all Shia men—accused of belonging to a terror cell. These 14 men were named in the list of the 37 people, including three who were minors at the time of arrest, accused of various terror-related charges who faced capital punishment in last week’s mass execution. One of those executed was then crucified.

One of the men, identified as Hussein Mohammed al-Musallam by CNN, claimed at the trial the confessions were fabricated and that he was tortured. He said he had suffered various injuries including a broken nose, collarbone, and leg and asked the court to summon medical reports from the prison hospital as supporting evidence.

The father of Mujtaba al-Sweikat, who was 17 when he was arrested after participating in a demonstration and was among those executed last week, also claimed his son had been tortured while acting as his attorney at the trial.

“He was subjected to psychological and physical abuse which drained his strength,” Nader al-Sweikat said in a statement carried by the judgement sheet quoted in CNN, adding that his son was forced to sign a confession dictated by an interrogator so the torture would stop.

The mass execution, one of the largest in Saudi Arabia’s history, drew international condemnation from various countries including the UK and from the UN High Commissioner for Human Rights Michelle Bachelet.