Paris (CNN)A man decapitated a schoolteacher in a suburb of Paris on Friday afternoon and was later shot dead by police, France's anti-terror prosecutor told CNN.
The victim's body was found in Éragny-sur-Oise, northwest of the capital, according to the French National Anti-Terror Prosecutor's office. The prosecutor's office confirmed that the attacker was killed by police in the same area.
The victim was a teacher at a secondary school in the region of Conflans-Sainte-Honorine, according to the prosecutor's office. The teacher recently showed controversial caricatures depicting the Prophet Mohammed to his students, according to multiple French media outlets, including CNN affiliate BFMTV.
According to French newspaper Le Monde, some Muslim parents complained to the school about the slain teacher's decision to use one or more of the cartoons as part of a discussion about the Charlie Hebdo attacks.
The prosecutor's office told CNN late Friday that four people had been taken into custody following the fatal attack.
Nordine Chaouadi, a parent of a student at the school, told Agence France-Presse the teacher took the Muslim children out of the class during the discussion.
"My son told me that it was just to preserve them, it was out of pure kindness, because he had to show a caricature of the prophet of Islam and simply said to the Muslim children: 'Go out, I don't want it to hurt your feelings,' that's what my son told me," Chaouadi told AFP.
French President Emmanuel Macron, speaking at the scene, said the teacher had been the "victim of an Islamist attack."
The teacher was "killed because he was teaching students freedom of speech, the freedom to believe and not believe," Macron said.
Police have provided few other details about the attacker, the victim or the incident. The anti-terror prosecutor's office, which has taken over the investigation of the attack, has not spoken publicly about a motive.
Interior Minister Gerald Darmamin said on Twitter that he was "keeping himself directly informed" of the situation "from the crisis room (he) had opened, in liaison with the President of the Republic and the Prime Minister."
Education Minister Jean-Michel Blanquer described the attack as a "despicable assassination of one of its servants, a teacher," and said his thoughts were with the family of the victim.
Friday's attack comes as a trial continues relating to a series of January 2015 terrorist attacks which began with a massacre at the Charlie Hebdo offices following the publication of cartoons depicting the Prophet Mohammed.