A history teacher who opened a discussion with students on caricatures of Islam’s Prophet Mohammed has been decapitated in a street near Paris, a police official said.

Officers shot the suspected killer dead, the official continued.

The French anti-terrorism prosecutor has opened an investigation into Friday’s incident outside the capital.

The gruesome killing of the teacher in a middle school occurred in the town of Conflans-Sainte-Honorine while the suspect was killed by police in adjoining Eragny. The towns are located in the Val d’Oise region north west of Paris.

President Emmanuel Macron is visiting the school.

Heavily armed police sealed off the area around the school, and police vans and emergency vehicles lined leafy adjacent streets.

France Teacher Decapitated
French police officers at the scene in Conflans-Saint-Honorine, north of Paris (Michel Euler/AP)

The suspect’s identity was not made public. French media reported that the suspect was an 18-year-old Chechen, born in Moscow. That information could not be immediately confirmed.

France has offered asylum to many Chechens since the Russian military waged war against Islamist separatists in Chechnya in the 1990s and early 2000s, and there are Chechen communities scattered around France.

France has seen occasional violence involving its Chechen community in recent months, in the Dijon region, the Mediterranean city of Nice, and the western town of Saint-Dizier, believed linked to local criminal activity.

The attack came as President Macron is pushing for a new law against what he calls domestic “separatism,” notably by Islamic radicals accused of indoctrinating vulnerable people through home schools, extremist preaching and other activities.

France has the largest Muslim population in Western Europe with up to five million members, and Islam is the country’s second religion.

A police official said the suspect, armed with a knife and an airsoft gun — which fires plastic pellets — was shot dead about 600 metres from where the male teacher was killed after he failed to respond to orders to put down his arms, and acted in a threatening manner.

The teacher had received threats after opening a discussion “for a debate” about the caricatures about 10 days ago, the police official told The Associated Press.

The parent of a student had filed a complaint against the teacher, another police official said, adding that the suspected killer did not have a child at the school.

The two officials could not be named because they were not authorized to discuss ongoing investigations.

“We didn’t see this coming,” Conflans resident Remi Tell said on CNews TV station. He had attended the middle school where the teacher taught, Bois D’Aulne, and described the town as peaceful.

It was the second terrorism-related incident since the opening of an ongoing trial on the newsroom massacre in Jan. 2015 at the satirical newspaper Charlie Hebdo after the publication of caricatures of the prophet of Islam.

As the trial opened, the paper republished caricatures of the prophet to underscore the right of freedom of expression. Exactly three weeks ago, a young man from Pakistan was arrested after stabbing, outside the newspaper’s former offices, two people who suffered non life-threatening injuries.

The 18-year-old told police he was upset about the publication of the caricatures.

Education Minister Jean-Michel Blanquer tweeted that it was France itself that was attacked.

“Our unity and firmness are the only response in the face of the monstrosity of Islamist terrorism,” he tweeted.