Lawyers and human rights groups have raised concerns over the French government’s crackdown on speech that glorifies terrorism after a series of cases rushed through the courts resulted in heavy prison sentences, including for people who had drunkenly insulted police officers.

The debate intensified this week after it emerged that an eight-year-old boy was questioned by police for saying at school “I am with the terrorists,” later admitting he didn’t know what terrorism meant.

The French justice ministry said that, between 7 January and 29 January, there had been 486 legal cases linked to the Charlie Hebdo attacks. Of these, 257 were cases of people accused of condoning or provoking terrorism. Around 41 of those cases had been instantly rushed through the courts and 18 people had been given prison sentences.

A new anti-terrorism bill which came into force last year has allowed a number of these cases to be accelerated through the courts, resulting in immediate prison sentences for the crime of “apologie du terrorisme” – in other words defending, condoning or provoking terrorism.

Amnesty International has raised concerns about some of these cases, including a man arrested for drunk-driving in the north of France who shouted at police officers: “There should be more Kouachis [the name of the gunmen brothers behind the Charlie Hebdo attack]. I hope that you’ll be next.” He was immediately brought before judges and sentenced to four years in prison.

Another man had shouted in the street, “I don’t like Charlie, they were right to do that.” A 21-year-old arrested on a tram for travelling without a ticket told the ticket inspectors: “The Kouachi brothers were just the start. I wish I’d been with them to kill more.” He was sentenced to ten months in prison.

Amnesty International warned against acting in haste and against free speech and urged “measures that protect everyone’s rights”.

The media has highlighted several cases, including a man in Isère, who a psychiatric report found had slight learning difficulties. He was sentenced to six months in prison after drunkenly shouting at police officers in the street: “They killed Charlie, I laughed.”

A 14-year-old girl from Nantes was placed under investigation for defending terrorism after she threatened ticket inspectors she would “get out the kalashnikovs” if they asked for her ticket on public transport. A 28-year-old man was sentenced to six months in prison after he shouted his support of the Charlie Hebdo attackers while passing a police station in eastern France.

The Paris barrister and influential legal blogger, Maître Eolas, detailed in a post the court appearance of a 21-year-old man with no criminal record who had been arrested on suspicion of trying to steal a car. Those charges were dropped but the man, who was drunk, had resisted arrest. He said he had been wrestled to the ground by police. While begging them to stop hurting him, he had allegedly shouted a torrent of insults including: “You’ll see, the jihadis will put a bullet in your head. Look at the damage they’ve done. My cousin Coulibaly [the gunman who killed a police officer then four people at a kosher supermarket] didn’t kill enough of you.” The man, immediately called before judges, denied having said it. He was sentenced to eight months in prison plus eight months’ suspended sentence for glorifying terrorism.

“Not only is this repression absurd and useless, but it is dangerous,” Eolas said. “It’s the defeat of reason. And we can’t allow it to happen.”

After the Charlie Hebdo attacks, the French justice minister Christiane Taubira specifically urged prosecutors to take tough action against those who condoned terrorism, as well as clamping down on racist or anti-Semitic acts. The law on glorifying terrorism, intended to crack down on online incitement to terrorism, means that comments that constitute defending, condoning or provoking terrorism are now punishable by up to five years in prison, or seven years if made while communicating with the public online.

Michel Tubiana, a lawyer from the French human rights group, La Ligue des Droits de l’Homme, said that where drunk people were being given heavy prison sentences for verbally insulting police there was a risk of the law being used to simply to set an example, which he deemed a kind of madness that had nothing to do with condoning terrorism and risked emptying the law of all sense.

“It’s a serious infringement which risks not just the unjustified pursuit of people but also risks self-censorship in the media and in public debate.” He said the European court of human rights could be asked to pronounce on certain of the judgements.

The left-leaning magistrates’ union, Syndicat de la Magistrature, has warned the justice system must take its time over cases and resist the “wave of emotion”.

The notorious French comedian Dieudonné M’bala M’bala is under investigation for being an apologist for terrorism after writing on Facebook that he “felt like Charlie Coulibaly” a reference to both Charlie Hebdo and the kosher supermarket gunman, Amédy Coulibaly.