PARIS (REUTERS, AFP) - The 18-year-old who beheaded a teacher outside the school in a Paris suburb where he taught had approached pupils in the street and asked them to point out his victim, anti-terrorism prosecutor Jean-Francois Ricard said on Saturday.
Police shot the Moscow-born attacker dead minutes after he murdered 47-year-old history teacher Samuel Paty in broad daylight in the suburb of Conflans-Sainte-Honorine on Friday.
A photograph of the teacher's body, accompanied by a message claiming responsibility posted on Twitter, was found on a phone near the assailant's body. Mr Ricard said the Twitter account belonged to the assailant.
The post was removed swiftly by Twitter, which said it had suspended the account because it violated the company's policy.
Mr Ricard quoted the message as saying: "In the name of Allah the most gracious, the most merciful, ... to (President Emmanuel) Macron, leader of the infidels, I have executed one of your hell-hounds who dared to belittle (Prophet) Mohammad."
Mr Paty had earlier this month shown his pupils cartoons of the Prophet Mohammad in a civics class on freedom of expression, angering a number of Muslim parents. Muslims believe that any depiction of the Prophet is blasphemous.
The attacker, of Chechen origin and had been living in the town of Evreux northwest of Paris, was not previously known to the intelligence services, Mr Ricard told a news conference.
The anti-terrorism prosecutor confirmed police were holding nine people in custody in connection with the attack.
Investigators were still trying to establish whether the attacker, who was shot dead by police, had acted alone or if he had accomplices, police sources say.
Witnesses heard the assailant shout "Allahu Akbar", or "God is greatest", a police source said.
French President Emmanuel Macron said the shocking act bore the hallmarks of "an Islamist terrorist attack".
Four relatives of the attacker, including a minor, were detained in the immediate hours after the Friday attack in the middle-class suburb of Conflans-Sainte-Honorine, the sources said.
Five more were later detained, among them two parents of students at the College du Bois d'Aulne, where the teacher was employed.
A nation in shock
France will react with the greatest firmness over the attack, Prime Minister Jean Castex said on Saturday.
"Through one of its defenders, it is the Republic which has been struck in the heart by Islamist terrorism," he wrote on Twitter. "In solidarity with its teachers, the State will react with the greatest firmness so that the Republic and its citizens live, free! We will never give up. Never."
The previous day, speaking near the scene where the teacher was decapitated, a visibly moved Mr Macron said "the entire nation" stands ready to defend teachers and that "obscurantism will not win".
The attack took place late on Friday afternoon near the middle school where the teacher worked in Conflans-Sainte-Honorine, a north-western suburb around 30km from central Paris.
Police arrived at the scene after receiving a call about a suspicious individual loitering near the school, a police source said.
They discovered the dead teacher 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 his injuries.
Identification documents found on the suspect showed he was an 18-year-old born in Moscow but from Russia's southern region of Chechnya.
The history teacher, Mr Paty, had had a recent class discussion on freedom of expression, during which he showed his students cartoons of Prophet Muhammad. The lesson prompted complaints from some parents.
According to a source, the two detained parents had signalled their disagreement with the teacher's decision to show the cartoons.
A week earlier, one man who said his daughter was in the class had recorded a video shared on social media in which he branded the teacher a thug and appealed to others to "join forces and say 'stop, don't touch our children'".
It was not clear if the parent was one of those in police custody. It was also not immediately known if the attacker had seen the video.
Muslim leaders have condemned the killing, which many public figures perceived as an attack on the essence of French statehood and its values of secularism, freedom of worship and freedom of expression.
Mr Tareq Oubrou, the imam of a Bordeaux mosque, denied that the killing marked a clash of civilisations.
"It is not a civilisation that kills an innocent person - it is barbarity," he told France Inter, adding that the litany of deadly attacks by Islamist militants or their sympathisers was devastating for France's Muslim community.
"Every day that passes without incident we give thanks," he said. "We are between hammer and anvil. It attacks the Republic, society, peace and the very essence of religion, which is about togetherness."
Students, parents pay tribute
At the school, parents and teachers paid tribute to the victim.
"(My daughter) is in pieces, terrorised by the violence of such an act. How will I explain to her the unthinkable?" one father wrote on Twitter.
"According to my son, he was super nice, super friendly, super kind," said Mr Nordine Chaouadi, another parent, adding that his son said the teacher had "simply said to the Muslim children, 'Leave, I don't want it to hurt your feelings.'"
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 that unleashed a wave of anger across the Islamic world.
The magazine had defiantly re-published the cartoons in the run-up to the trial's opening last month.
In the same month, a young Pakistani wounded two people with a meat cleaver outside the magazine's former offices.