Image copyright iStock

A video showing two gay men being beaten up has provoked two very different social media campaigns in Morocco. One in support of the victims of the attack, and another in support of the alleged attackers.

Last month, graphic footage appeared on YouTube showing two half naked men with blood on their faces being attacked and dragged into the street by a mob in the city of Beni Mellal. The video was later taken down but excerpts have since appeared elsewhere online.

Five of the attackers and one of the victims have been arrested by the authorities in Morocco, where homosexual acts are punishable by up to three years in jail.

The incident has provoked a strong reaction on social media.

An online campaign calling for the interior minister to release one of the victims of the attack and decriminalise homosexuality has attracted nearly 50,000 signatures. As international attention attention is drawn to the case, a team of French journalists who were investigating the incident have been arrested. The authorities claim it was because they did not have the correct clearance to work in the country.

Blogger Hicham Tahir has asked "My Morocco, why are you so homophobic?" in response to the attacks.

A group of more than a dozen LGBT organisations has released a statement alleging human rights violations.

The Moroccan website Tel Quel reported that a pre-trial hearing of the accused took place in a crowded room, in the presence of an association calling for the release of the assailants.

The association's views have been mirrored on social media too. A Facebook page has been created demanding the release of the attackers. And there have been anti-gay demonstrations on the streets.

Follow BBC Trending on Facebook

Join the conversation on this and other stories here.

"They think they are 'saving' traditional values," says Samir Bargachi, the president of Kif Kif, an association based in Spain that fights for the rights of LGBT people in Morocco.

Bargachi says the visibility of gay people in Morocco has increased in the last few years, but many still face huge challenges in the country.

In July last year, another video surfaced on Moroccan social media of a crowd in Fes assaulting a man because he was thought to be gay. And in June two men were jailed for four months for kissing in public.

Blog by Zainul Abid

Next Story: Is this Gap advert racist?

Image copyright Gap Kids

The clothing giant says it will pull an advert photo showing a white girl resting her arm on a black girl's head - in response to online controversy. READ MORE

You can follow BBC Trending on Twitter @BBCtrending, and find us on Facebook. All our stories are at bbc.com/trending.