Two men were sent to jail in Morocco for being gay.

The Primary Court in Tangier, a major city overlooking the Strait of Gibraltar, sentenced two men to six months in prison for ‘engaging in homosexual acts’ on 24 February.

They were also fined 1,000 dirham ($99, €94) each.

The two men, a university student and a real estate agent, were arrested on 9 February and charged with committing homosexual acts and possession of a weapon.

They had been found out after a 90 second video of them started circulating on WhatsApp. According to Bladi, the video also circulated on porn websites.

It had been circulating for weeks before the two men in the video were identified.

Some news websites previously reported it shows the men kissing and exchanging affection, while others – including Morocco World News – now say it shows them engaging in full sexual acts.

Because it went viral, police also accused the men of spreading pornographic material.

But one of the men said the clip was brought into circulation by one of his friends, Akaliyat Mag reports, after he left his phone on a café table.

In his speech in court, the man also accused police of executing physical and psychological violence while they were at the police station.

Under article 489 of Moroccan Penal Code, a person ‘serving unnatural acts with a person of the same sex’ can be sentenced to a prison sentence between six months and three years.

Fines range from 120 ($11, €11) to 1,200 dirham ($119, €112).

After two men were arrested for being gay in Agadir last summer, at least 20 Moroccan NGOs called on the government to repeal the homosexuality ban.