On Friday, the French police announced that they had shot dead a young man who had slaughtered a teacher minutes earlier in a preparatory school on the outskirts of the capital, Paris, after he showed cartoons of the Prophet Muhammad, may God bless him and grant him peace, in a class on freedom of expression.

The director of the Al-Jazeera office in France, Ayach Draghi, said that the 47-year-old teacher showed pictures of the Prophet that had been published in the Charlie Hebdo magazine, and informed Muslim students before showing the pictures and allowed them to leave the class if they did not want to see, adding that a number of students' families complained to the school administration. Then the teacher later apologized and admitted that he had taken up the topic and he should not have done so.

The French counterterrorism prosecutor said he was investigating the attack in the Conflans-Saint-Honorine suburb northwest of Paris.

A police patrol spotted the suspected attacker (under the age of 20) carrying a knife a short distance from the site of the attack, and a police spokesman said that they had shot the suspect and killed him, and the killer had posted a picture of the victim.

A police source said that witnesses heard the attacker chanting "God is great."

The police spokesman said this information is being verified.

French President Emmanuel Macron is visiting the crime scene, and the Minister of the Interior has cut short a visit to him outside the country.

Late last month, a migrant from Pakistan injured two people after attacking them with a machete outside the former headquarters of Charlie Hebdo satirical magazine, which published insulting cartoons of the Holy Prophet Muhammad, peace be upon him.

Accused of killing two journalists in the magazine who had published cartoons insulting to the Prophet in 2015 are on trial.