A suspect shot dead by police after the beheading of a history teacher near Paris was an 18-year-old Chechen, French police said.

Authorities investigating the horrific killing of Samuel Paty in Conflans-Sainte-Honorine have also arrested nine suspects, including the grandparents, parents and 17-year-old brother of the suspected attacker.

Mr Paty had discussed caricatures of Islam’s Prophet Mohammed with his class, authorities said.

Chechnya is a predominantly Muslim Russian republic in the North Caucasus. Two wars in the 1990s triggered a wave of emigration, with many Chechens heading for western Europe.

France has seen occasional violence involving its Chechen community in recent months, believed to be linked to local criminal activity and score-settling.

School attack
French police officers stand outside the school (AP)

A police official said the suspect in Friday’s attack north of the capital was shot dead about 600 yards from where the teacher was killed.

He was armed with a knife and an airsoft gun – which fires plastic pellets – and police opened fire after he failed to respond to orders to put down his weapons, and acted in a threatening manner.

French president Emmanuel Macron arrived quickly at the school on Friday night to denounce what he called an “Islamist terrorist attack”. He urged the nation to stand united against extremism.

Mr Macron said: “One of our compatriots was murdered today because he taught… the freedom of expression, the freedom to believe or not believe.”

Other French leaders offered messages of sadness, but also of hope in the hours after the drama.

“We’ll pick ourselves up together, thanks to our spirit of solidarity,” said Laurent Brosse, mayor of Conflans-Sainte-Honorine, at a news conference.

“We are all affected, all touched by this vile assassination,” said French education minister Jean-Michel Blanquer in a video message.

The presidential Elysee Palace announced that there will be a national ceremony on a future date in homage to Mr Paty, about whom few details have so far emerged.

The French anti-terrorism prosecutor opened an investigation for murder with a suspected terrorist motive.

French attack
The incident took place in Conflans-Sainte-Honorine, north of Paris (AP)

It is the second time in three weeks that terror has struck France linked to caricatures of the Prophet Muhammad.

Last month, a young man from Pakistan was arrested after stabbing two people with a meat cleaver outside the former offices of the satirical newspaper Charlie Hebdo.

The weekly was the target of a deadly newsroom attack in 2015, and it republished caricatures of the prophet this month to underscore the right to freedom of information as a trial opened linked to that attack.

Friday’s terror attack came as Mr Macron’s government works on a bill to address Islamic radicals, who authorities claim are creating a parallel society outside the values of the French Republic.

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

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

The parent of a student had filed a complaint against the teacher, another police official said.