Attacker tweeted against Muhammad caricature

French prosecutors investigating a fatal knife attack on a school teacher say the suspect posted a Tweet shortly after the killing, hinting he carried it out in connection with a caricature of the Prophet Muhammad.

The teacher was found decapitated on Friday evening near the secondary school in a Paris suburb where he taught.

Prosecutors suspect an 18-year-old Russia-born man of Chechen origin carried out the attack.

Police officers shot the man to death as he tried to attack them with a knife when they rushed to the scene.

At a news conference on Saturday, a prosecutor said that the suspect posted a message with a photo of the victim's body on Twitter shortly after the attack.

The prosecutor quoted the message as saying in part, "I have executed one of your hell-hounds who dared to belittle Prophet Muhammad."

Earlier this month, the teacher had shown his students a caricature of the Prophet Muhammad as part of a class on freedom of expression.

Some parents reportedly criticized him via social media for showing the caricature.

The prosecutors say the suspect could have planned the attack after learning about those social media posts.

Nine people have been detained for questioning.

They include members of the suspect's family and parents who attacked the teacher on social media.