The teacher who was beheaded in a street in France had received threats after showing controversial cartoons of the Prophet Muhammad to his pupils, French media report.
Nine people have been arrested, including the parents of a child at the school where the teacher was working, judicial sources are quoted as saying.
The attacker was shot dead by police near the scene of Friday’s killing.
Police say the attacker was an 18-year-old man of Chechen origin.
The killing took place while a trial is under way in Paris over a 2015 Islamist assault on the French satirical magazine Charlie Hebdo, which was targeted for publishing the cartoons.
French President Emmanuel Macron said the attack bore all the hallmarks of an “Islamist terrorist attack” and the teacher had been murdered because he “taught freedom of expression”.
Speaking at the scene hours after the incident, he stressed national unity. “They will not prevail, they will not divide us,” he said.
What do we know?
The attack occurred at about 17:00 (15:00 GMT) near a middle school in the town of Conflans-Sainte-Honorine, some 30km (20 miles) north-west of central Paris.
A man wielding a large knife attacked the teacher in the street, cutting off his head. Witnesses are said to have heard the attacker shout “Allahu Akbar”, or “God is Greatest”.
The attacker then ran off, but local police were quickly at the scene, having been alerted by the public.
The officers confronted the man in the nearby town of Éragny.
When they shouted at him to give himself up, he is said to have threatened them. The officers shot him and he died a short time later.
The scene is now sealed off, as the investigation continues.
Police have said the attacker was an 18-year-old, born in Moscow but from Russia’s predominantly-Muslim southern region of Chechnya. His grandparents and two brothers are among those arrested.
Who was the victim?
Police have identified the victim as 47-year-old Samuel Paty, a teacher of history and geography, who had taken a class about freedom of expression earlier in the month.
He is said to have shown the cartoons of the Prophet Muhammad while talking about the Charlie Hebdo case, and had reportedly advised Muslim students to leave the room if they thought they might be offended.
Some Muslim parents complained to the school and French media report that Mr Paty had received a number of unspecified threats as a result of the class.
“According to my son, he was super-nice, super-friendly, super-kind,” a parent from the school, Nordine Chaouadi, told AFP news agency.
Charlie Hebdo tweeted: “Intolerance just reached a new threshold and seems to stop at nothing to impose terror in our country.”
France has seen a wave of Islamist violence since the 2015 attack on Charlie Hebdo that left 12 people dead, including famous cartoonists.
Three weeks ago, as the trial got under way, a man attacked and wounded two people outside the magazine’s former offices.
How is France reacting?
In the National Assembly, France’s parliament, deputies stood up to honour the teacher and condemn the “atrocious terror attack”.
Muslim leaders in France also condemned the attack. “It is not a civilisation that kills an innocent person, it is barbarity,” Tareq Oubrou, imam of a mosque in Bordeaux, told France Inter.
Interior Minister Gerald Darmanin cut short his trip to Morocco to return to Paris.
Education Minister Jean-Michel Blanquer tweeted that the killing of a teacher was an attack on the French Republic.
He said his thoughts were with the victim and his family, and unity and firmness were the only responses to “Islamist terrorism”.