People place flowers at the doors of a Paris school where the beheaded teacher worked

Conflans-Sainte-Honorine (France) (AFP) - The man suspected of beheading a French teacher who showed his students cartoons of the prophet Mohammed was an 18-year-old Chechen, a judicial source said Saturday, in what President Emmanuel Macron called an “Islamist terror attack”.

Police have detained nine people over Friday’s attack near the school where the teacher worked in Conflans-Saint-Honorine, a usually quiet suburb around 30 kilometres (20 miles) northwest of central Paris.

The assailant was shot by police and later died of his injuries.

Police said the victim was 47-year-old history teacher Samuel Paty, who had shown the cartoons as part of a class discussion on freedom of expression that had prompted complaints from parents.

Four of the suspect’s relatives – two brothers and his grandparents – were initially detained by police for questioning.

The killing bore the hallmarks of "an Islamist terrorist attack", President Emmanuel Macron said as he visited the scene

The judicial source told AFP Saturday that five more people had been detained, including the parents of a child at the school.

According to the source, the parents had signalled their disagreement with the teacher’s decision to show the cartoons.

The three other new people detained are members of the suspect’s social circle.

The attack came as a trial is in progress over the January 2015 massacre at the offices of the Charlie Hebdo satirical magazine, which had published caricatures of the prophet Mohammed that unleashed a wave of anger across the Islamic world.

The magazine defiantly republished the cartoons in the run-up to the trial’s opening in September and last month a young Pakistani wounded two people with a meat cleaver outside its former offices.

- ‘Will not win’ -

Identification documents found on the beheading suspect showed he was an 18-year-old born in Moscow but from Russia’s southern region of Chechnya.

The beheading of a teacher on the outskirts of Paris has shocked France

The attacker shouted “Allahu Akbar” (“God is greatest”) as police confronted him, a cry often heard in jihadist attacks, a police source said.

There had been no previous indication that he was a potential radical, a source close to the investigation said.

French anti-terror prosecutors said they were treating the assault as “a murder linked to a terrorist organisation”.

Police said they were investigating a tweet posted from an account – since shut down – that showed a picture of the teacher’s head.

It was unclear whether the message, which contained a threat against Macron – describing him as “the leader of the infidels” – had been posted by the attacker, they said.

Visibly moved as he visited the scene, Macron said “the entire nation” stood ready to defend teachers and that “obscurantism will not win”.

The school where the teacher worked is in Conflans-Saint-Honorine, a usually quiet suburb of Paris

His office said Saturday a “national tribute” would be held in Paty’s honour.

Prime Minister Jean Castex tweeted that “our teachers will continue to awaken the critical spirit of the citizens of the republic, to emanicipate them from all totalitarianism”.

The Strasbourg-based Assembly of Chechens in Europe said in a statement that “like all French people our community is horrified by this incident”.

- ‘Super friendly and kind’ -

At the school, parents and teachers paid tribute to Paty, who was said to have been widely liked and himself a father.

People hold a sign reading 'I am a teacher - Freedom of speech' outside the school where Paty worked

Paty’s former student Martial, 16, said the teacher loved his job: “He really wanted to teach us things – sometimes we had debates.”

Another student Tiago said he saw Paty on the day he died. “He came to my class to see our teacher. It’s shocking that I won’t see him again.”

“According to my son, he was super nice, super friendly, super kind,” Nordine Chaouadi, a parent of one of Paty’s students, told AFP.

The attack took place in Conflans Saint-Honorine, a northwestern suburb around 30 kilometres from central Paris

The teacher “simply said to the Muslim children: ‘Leave, I don’t want it to hurt your feelings.’ That’s what my son told me,” the parent said.

Sources said one of those detained was a father who had posted a video on social media expressing shock that cartoons showing the prophet “naked” had been shown in his daughter’s class.

In the video, the father had reportedly called Paty a “rogue” who should no longer be a teacher and called on other parents to mobilise.

Rodrigo Arenas, head of the FCPE parents’ association, said a complaint had been received from a “very agitated” father.

He said Paty had invited Muslim students to leave the room before showing the cartoons.

Virginie, 15, said Paty did this every year as part of a discussion about freedom following the Charlie Hebdo attack.

In a tweet, Charlie Hebdo expressed its “sense of horror and revolt” at Friday’s attack.

Police went to the scene after receiving a call about a suspicious individual loitering near the school, a police source said.

They discovered the dead man and soon spotted the suspect, armed with a blade, who threatened the officers as they tried to arrest him.

They opened fire and he later died of gunshot wounds.