French police have conducted a series of raids targeting Islamist networks, three days after the beheading of a history teacher who had shown his pupils a cartoon of the Prophet Mohammed.

Interior minister Gerald Darmanin vowed that there would be “not a minute’s respite for enemies of the Republic”, after tens of thousands took part in rallies countrywide on Sunday to honour teacher Samuel Paty and defend freedom of expression.

A silent rally was planned on Tuesday evening, as well as a ceremony on Wednesday at the Sorbonne attended by President Emmanuel Macron.

Fifteen people have been detained so far, including four pupils who may have helped the killer – an 18-year-old of Chechen origin who was killed by police – to identify the teacher in return for payment.

Law enforcement carried out 40 raids on Monday, mostly around Paris, with many more planned.

“We want to harass and destabilise this movement in a very determined way,” one ministry source said.

Darmanin said the government would also tighten its grip on institutions and charities with suspected links to Islamist networks.

Paty, 47, was attacked on his way home from the junior high school where he taught in Conflans-Sainte-Honorine, 40km northwest of Paris.

A witness, who gave only his first name Stephane to news channel LCI, said he was nearby when the “barbaric” attack happened, sheltering with his children.

“We did not know what is going on. There was just a beheaded man in front of our house,” he said, adding he then saw the assailant take pictures.

A photo of the teacher and a message confessing to his murder was found on the mobile phone of his killer, Abdullakh Anzorov, who arrived in France with his family from the predominantly Muslim Russian region of Chechnya more than a decade ago.

Four members of the killer’s family were among those detained.

The killing has drawn parallels with the 2015 massacre at French satirical magazine Charlie Hebdo, where 12 people, including cartoonists, were gunned down for publishing cartoons of Mohammed.

Paty had shown his class one of the controversial images after first giving Muslim children the option to leave the classroom.

But the lesson nonetheless caused uproar.

The father of one of Paty’s pupils launched an online campaign against the teacher and has now been arrested along with a known Islamist radical.

Darmanin accused the pair of in effect issuing a “fatwa” against the teacher.

Officials named two groups they would target for closure – the Collective Against Islamophobia in France that says it monitors attacks against Muslims, and BarakaCity, which describes itself as a humanitarian organisation.

In a social media post, BarakaCity accused Darmanin of “going mad” and said he was taking advantage of a tragedy.

Darmanin also ordered the closure of a Paris mosque, accusing its imam of encouraging intimidation of the teacher and publicising the school’s address.

Meanwhile, Paris prosecutors said they had opened an investigation into a French neo-Nazi website hosted abroad that republished the photo of Paty’s decapitated corpse posted to Twitter by the killer.