A teacher was beheaded on a street near Paris on Friday afternoon after hosting a class discussion with secondary school students about cartoons of Islam”s Prophet Muhammad.
The suspected killer, who was armed with a knife and a plastic pellet gun, was later shot dead by officers in a nearby town, police said.
French authorities have launched an anti-terror investigation.
President Emmanuel Macron called it an “assassination” and an “Islamist terrorist attack”.
The victim, a history and geography teacher, was decapitated near a school in the commune of Conflans Saint-Honorine, northwest of the French capital, at around 5pm local time.
Police told the AFP agency that the teacher had shown cartoons depicting the prophet to his class.
His alleged attacker was reported to be 18 years old, of Chechen origin and born in Moscow.
Officials said he was shot dead in the neighbouring town of Éragny after he acted in a threatening manner and failed to respond to an order to put down his weapons.
President Macron visited the Bois d’Aulne school and met the history teacher’s colleagues on Friday evening.
He said afterwards: “One of our citizens was assassinated tonight because he was a teacher, because he taught students about the liberty of expression, the liberty to believe or not to believe.
“Our countryman was the victim of a cowardly attack. The victim of an Islamist terrorist attack.”
He added the attack should not divide France because, he said, that is what the extremists want.
The incident came as the French government works on a bill to address Islamist radicals who authorities claim are creating a “parallel society outside the values of the French Republic”.
Interior Minister Gérald Darmanin, who was on a trip to Morocco, decided to return to Paris immediately.
It was the second terrorism-related incident since a trial began into the January 2015 massacre at the satirical magazine Charlie Hebdo, which had published cartoons depicting Muhammad.
It republished them this year as the trial got underway.
Three weeks ago, an 18-year-old from Pakistan was arrested after stabbing two people outside the Charlie Hebdo offices.
He told police he was upset about the publication of the caricatures. His victims suffered non life-threatening injuries.
Police set up a security perimeter and have advised locals to avoid the area.