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 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 Tuesday evening, as well as a ceremony Wednesday at the Sorbonne attended by President Emmanuel Macron.

Paris Demonstration
In Paris, government ministers joined the city's mayor for the demonstration Photo: AFP / BERTRAND GUAY

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.

Teachers demonstrate in Paris
Teachers gather to pay tribute in Brittany Photo: AFPTV / Damien MEYER

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, 40 kilometres (25 miles) northwest of Paris.

Paris demonstrations
A person holds a placard reading "I am Samuel" as people gather on Place de la Republique in Paris on October 18, 2020, in homage to history teacher Samuel Paty two days after he was beheaded by an attacker who was shot dead by policemen.Thousands of people rally in Paris and other French cities on October 18 in a show of solidarity and defiance after a teacher was beheaded for showing pupils cartoons of the Prophet Mohammed. Photo: AFP / BERTRAND GUAY

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.

Le Pen called for 'wartime measures'
Le Pen called for 'wartime measures' to tackle the terror threat Photo: AFP / Thomas SAMSON

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.

Gerald Darmanin
Gerald Darmanin said the government would also tighten its grip on NGOs with suspected links to Islamist networks Photo: AFP / Ludovic MARIN

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.

French teachers have long complained of tensions around religion and identity spilling over into the classroom.

One education expert warned Monday that the murder might deter teachers from tackling sensitive topics in future.

"There's a huge amount of self-censorship," said Jean-Pierre Obin, a former inspector for the French education system. "We must fear that there will now be more."

But Jonathan Renoir, a 26-year old history teacher at a junior high school in Cergy near Paris, said: "We can't give in to fear, we must continue to talk about controversial things in class."

Emotions were still running high outside Paty's school on Monday, where Muslim leaders gathered to offer condolences and distance their religion from the atrocity.

"It is very important to come here to show our sorrow, to show that what happened here is not Islam. It was done by thugs who have nothing to do with Islam," said Kemadou Gassama, an imam in Paris.

Far-right National Rally leader Marine Le Pen -- likely to face Macron in a 2022 presidential election -- called for "wartime legislation" and an immediate moratorium on immigration.

Paty's beheading was the second knife attack since a trial started last month over the Charlie Hebdo killings. In the other attack, two people were wounded outside the publication's former offices.

Copyright AFP. All rights reserved.