Two Moroccan nationals have been detained by police over homosexuality charges. A court in southern town of Tiznit  announced the indictment on Monday. They have been sentenced to jail for one and half years.

Hamza M and Osman A were penalised with 2000 dirhams, that is £375.

One of the accused, Osman A admitted the relationship, but Hamza M refused the charges straight away. Both of them tried to run away while being taken into custody.  They attacked the policemen with knives. Although, they were detained later.

According to the Moroccan penal code, under Article 489, gay sex is a punishable offence with three years of imprisonment and fine.  “Sexual deviancy” is an official term used by the police and court to refer to homosexuality, according to a report.

A case was reported last month, when two men were arrested after their video of kissing got viral on social media. The video showed two dark figures, kissing in a classroom in the high school. Authorities of the southern city of Inezgane took legal actions against the defendants.

In March 2015, another case surfaced, where two Moroccans were caught together while having sex. Campaigners from Human Rights Watch (HRW) and the Aswat Group for Sexual Minorities, criticized this move and said that the judgement violated Morocco’s 2011 Constitution which, states “a right to a private life”, according to a report by Pink News.

The men were charged based on “police confessions”.

In a case in 2014, a 69-year old British man, Ray Cole was also not aware of gay laws in Morocco. A retired magazine publisher from Deal in Kent was arrested by Moroccan police for indulging in homosexuality. Cole was on holiday to meet his Moroccan friend, Jamal Jam Wald Nass. They were approached by police at a bus stop and arrested on suspicion of homosexuality, according to a report by Pink News.

Both are punished with four months of imprisonment.