The man who beheaded a teacher in a street in France waited outside the school and asked pupils to identify his target, anti-terrorism officials say.
The man then posted images on social media of dead victim Samuel Paty, 47, who had shown controversial cartoons of the Prophet Muhammad to his students.
The attacker later fired at police with an airgun before being shot dead.
Nine people have been arrested and are being investigated for possible links to Islamic extremism.
The attack took place at about 17:00 (15:00 GMT) on Friday near the College du Bois d’Aulne, where Mr Paty taught, in the town of Conflans-Sainte-Honorine, some 30km (20 miles) north-west of central Paris.
President Emmanuel Macron said the attack bore all the hallmarks of an “Islamist terrorist attack” and the teacher had been murdered because he “taught freedom of expression”.
A national tribute will be paid to Mr Paty.