A tribunal has sentenced the owner of the first overground sex shop in Morocco to eight months in prison and a €900 (£700) fine, local papers reported.

Imad El Idrissa, 22, was jailed for openly operating the shop in the conservative Muslim country after he was authorised by the health ministry to run a pharmacy in Casablanca. Sex shops in Morocco are underground affairs.

Muslims were angered by the announcement of the shop opening in the Sbata quarter of Casablanca and said it was a conspiracy against Islamist Prime Minister Abdelilah Benkirane, according to the I-Bergag website.

Critics claimed the revolutionary February 20 Youth Movement, which is opposed to the government and has demanded democratic reforms, might have spread rumours about the shop to make life uncomfortable for the government.

An article about the opening went viral on social media sites and blogs. It started with the sentence: "Under an Islamist government, a sex shop has been inaugurated."

In the pre-publicity, the shop address was given as being in a working class area. "There is no way residents of a working class area would allow the opening of a sex shop," one activist told Dubai-based satellite TV channel Al Arabiya. "Those neighbourhoods are usually conservative and take pride in their Islamic identity."

Several Moroccan activists denied that there was a conspiracy against Benkirane.

"Does Benkirane represent all Moroccans?" asked an activist called Hamadi. "Benkirane is only a symbol of hypocrisy and it is not a surprise that this sex shop and other similar ones [will] be opened under his government.

"Stealing the money of poor Moroccans is the reason for corruption and not the sale of sex toys or alcohol or even drugs," Al Arabiya quoted al-Aati Allah as saying.