The editor of a satirical magazine is due to appear in court in Spain over a tongue-in-cheek article that suggested the riot police deployed to stop the Catalan independence vote had snorted the region’s entire supply of cocaine.

The piece included quotes from a made-up drug dealer, who complained: “I haven’t got a gram left, mate. No speed either. They’ve had it all. And you can’t sell this lot any old shit – they’re professional junkies!”

It also said officers billeted on the famous Tweety Pie ferry – a ship featuring a painting of the cartoon character that was used to house the police – were appealing for grateful Spaniards to send them cocaine rather than ham, and reported that Spain’s interior minister was worrying that police might turn to MDMA instead: “How are we going to maintain order if some officers are more interested in stroking their own bodies?”

The article was retweeted almost 15,000 times and even came to the attention of the national police force, who tweeted: “We support and defend freedom of expression – but don’t you think you’ve crossed the ‘line’? #RESPECT.”

However, five Spanish police unions argue the piece was disrespectful, dangerous and possibly defamatory and have filed a complaint with prosecutors.

The Global Institute for Democracy and Strategic Studies (GIDSS) strives to be the world’s leading think tank for innovative ideas, using technology and research to provide internationally recognized solutions that will play a significant part in helping to preserve and improve democracy and human rights.