France's anti-terror prosecutor said the teacher beheaded outside his school in a Paris suburb was killed after becoming the target of an angry campaign on social media.

A man holds a sign reading
A man holds a sign reading "I am a teacher" among people demonstrating in Rennes, western France on October 17, 2020. (AFP)

France's anti-terror prosecutor says a history teacher beheaded in a Paris suburb had been the target of online threats for showing pupils cartoons of the Prophet Muhammed in class.

The father of a schoolgirl had sought 47-year-old teacher Samuel Paty's dismissal and launched an online call for "mobilisation" against him after the lesson on freedom of expression, Jean-Francois Ricard said in a televised news conference.

Paty was decapitated outside his school in Conflans-Sainte-Honorine, northwest of the capital, and the killer was fatally wounded by police.

The Russian embassy in Paris said the suspect was Abdullakh Anzorov, whose family had arrived in France when he was six and requested asylum.

The 18-year-old had received a residence permit this year, according to the embassy, and had no links with Russia.

Online Campaign

The first sign of an issue with year's civics lesson emerged on October 7 when the parent of the girl who was in the class posted an angry video on Facebook.

In it, he said the teacher had shown the cartoons of Muhammad and that his daughter, a Muslim, had been disciplined for expressing her displeasure.

The man, not named by officials, said he wanted the teacher removed.

The next day, the father went to see the principal of the school to complain, prosecutors said. That evening, he put out another Facebook video, giving the name of the teacher and identifying the school.

On October 12, another video appeared on YouTube, featuring the father of the pupil. A man off-camera interviewed the man's daughter.

The voice off-camera said President Emmanuel Macron was inciting hatred of Muslims and threatened a demonstration if the teacher was not removed.

The man off-camera was known to intelligence services, Ricard said, though he did not say in what capacity. 

An arrest warrant is out for the father's half-sister, who has joined Daesh in Syria, Richard added. 

Both men were detained by police after Paty's killing.

Ricard did not say if the attacker had any links to the school, pupils or parents, or had acted independently in response to the online campaign.

Witnesses said he was spotted at the school on Friday afternoon asking pupils where he could find Paty.

A photograph of Paty and a message confessing to his murder were found on the assailant's mobile phone.

The prosecutor said the attacker had been armed with a knife, an airgun and five canisters. He had fired shots at police and tried to stab them as they closed in on him.

He was in turn shot nine times, said Ricard.

READ MORE: 18-year-old accused of beheading teacher in Paris killed by police

Second recent attack of its kind 

This was the second such attack since a trial started last month into the January 2015 attack at the offices of the Charlie Hebdo satirical magazine, which had published caricatures of the prophet that unleashed a wave of anger across the Islamic world.

The magazine republished the cartoons in the run-up to the trial, and last month a young Pakistani man wounded two people with a meat cleaver outside Charlie Hebdo's former Paris offices.

Ricard said Paty's murder illustrated "the very high level terrorist threat" France still faces.

Those arrested included four close family members of the suspect, and two people who had reported to police to say they had been in contact with him, said the prosecutor.

Police also arrested a friend of the schoolgirl's father who had gone with him to see the principal to demand Paty's dismissal.

The friend, a known militant, was already on the radar of French intelligence services.

READ MORE: French police shoot dead suspect after teacher decapitated

Macron threat

The attacker himself was not known to the French intelligence services, said the prosecutor.

An investigation is under way into "murder linked to a terrorist organisation".

The investigation will also look at a tweet from an account opened by the attacker, and since shut down, that showed a picture of Paty's head and described Macron as "the leader of the infidels".

Macron this month invoked the ire of Muslims when he described Islam as a religion "in crisis" as he unveiled a plan to defend France's secular values.

The president visited the scene of the crime on Friday, and vowed that "the entire nation" stood ready to defend teachers.

His office said a national tribute would be held for Paty on Wednesday.

On Sunday, ministers who form France's defence council will meet to discuss the killing, while a public mourning event is planned for Wednesday.

On Saturday, hundreds of pupils, teachers and parents flooded to Paty's school to weep and lay white roses.

Some carried placards stating: "I am a teacher" and "I am Samuel" -- echoing the "I am Charlie" cry that travelled around the world after the 2015 Charlie Hebdo killings.

READ MORE: Several detained in Paris knife attack as stabber confesses

'Horror and revolt' 

Martial, a 16-year-old pupil, said Paty had loved his job: "He really wanted to teach us things."

According to parents and teachers, Paty gave Muslim children the option to leave the classroom before he showed the cartoons, saying he did not want their feelings hurt.

Virginie, 15, said Paty showed the cartoons every year as part of a discussion about freedom following the Charlie Hebdo attack.

In a tweet, Charlie Hebdo expressed its "sense of horror and revolt" at Friday's attack.

"A teacher was assassinated for the work that he does, but freedom of thought, freedom of expression, and the ability to teach these fundamental principles in our school s have also been attacked," added Ricard.

READ MORE: France launches terror investigation into Paris knife attack

Source: TRTWorld and agencies