PARIS—Days before Samuel Paty was beheaded in an attack that shocked France, the 47-year-old history teacher was guiding his class through a fraught debate over the limits of free speech.
The teacher—who was interviewed by French authorities about the lesson before his death—said he had warned students in the class to avert their eyes before he displayed cartoons from Charlie Hebdo, the satirical magazine targeted in a bloody terror attack in 2015.
“He said he had taken care, before showing some of these drawings, to suggest his students look away in the event they might be offended,” said Jean-François Ricard, France’s antiterrorism prosecutor.
The lesson, however, angered a parent at the school, who posted videos on social media, directing invective at Mr. Paty for sharing a depiction of Muhammad with the class and demanding his dismissal, Mr. Ricard said. French investigators are now trying to determine how the polemic spilled onto social media and whether that exposure played a role in Mr. Paty’s killing.
French officials say his attacker—identified as Abdoullakh Abouyezidvitch A., an 18-year-old Russian national of Chechen origin—lurked outside the school on Friday afternoon asking students to identify Mr. Paty. He killed him shortly after classes ended, leaving his body in the street, officials said. Mr. Ricard said the suspect then claimed responsibility for the attack in a message sent on his Twitter account, which said Mr. Paty had abased the Muslim Prophet Muhammad. Police shot him dead minutes later.
Police have detained at least nine people for questioning in connection with the attack, including four family members of the suspect and the parent who posted the videos.
The attack unfolded against a backdrop of rising tensions between France’s Muslim community, among Europe’s largest, and a political establishment determined to preserve the country’s long-running tradition of strict secularism.
Those two worlds collide in the classroom, where France has imposed a ban on Muslim headscarves and other religious symbols. France will organize a national homage to Mr. Paty in coordination with his family Wednesday, according to an aide to French President Emmanuel Macron.
“It’s an attack against the Republic because school is the backbone of the Republic,” French Education Minister Jean-Michel Blanquer said.
Mr. Macron’s government has recently moved to outlaw what he called “Islamic separatism” in communities where he said religious laws are taking precedence over civil ones. Mr. Macron said the law, if passed, would empower authorities to shut down associations and schools that he said indoctrinate children, and monitor foreign investment in religious organizations in France.
The proposed law aims to stem what many French consider the steady erosion of the values of the French republic. Charlie Hebdo’s tendency to depict religious figures in bawdy cartoons made it a symbol of freedom of expression. It also made the magazine a target for Islamic State militants who massacred the publication’s newsroom in January 2015 before dying in a shootout with police days later.
In September, France opened a trial of the attack’s alleged accomplices after a yearslong investigation into the assault and another attack that occurred days later on a Kosher grocery store. As the trial started, Charlie Hebdo republished the cartoons that triggered the 2015 attack, saying the cartoons served as “evidence.” Days later, a Pakistani immigrant wielding a butcher knife attacked and seriously wounded two people outside Charlie Hebdo’s former office.
It was in this cauldron of social and religious turmoil that Mr. Paty prepared to give his lesson in early October. As part of that eight-grade lesson on the “contours and limits of free speech,” Mr. Ricard said Mr. Paty had organized a debate over Charlie Hebdo’s publication of caricatures of Muhammad.
According to a copy of the lesson plan described by Mr. Ricard, Mr. Paty showed the class two cartoons. One depicted a man on his hands and knees, with his genitals exposed and a star covering part of his backside. The cartoon’s caption read: “Muhammad, a star is born,” Mr. Ricard said.
A parent at the school was incensed, and on Oct. 7 recorded the first of three videos and several social media postings inciting others to protest and seek Mr. Paty’s firing, Mr. Ricard said. The parent, whose name hasn’t been released, is the father whose daughter attends the school, and is now in custody for questioning related to the attack, Mr. Ricard said. The man’s half sister joined Islamic State in Syria in 2014, and is still sought by authorities, Mr. Ricard said.
In the first video, which was viewed by The Wall Street Journal, the father calls Mr. Paty a “thug.” The teacher, he says, had asked Muslim students in the class to raise their hands and then directed them to leave the classroom before showing his daughter and the remaining students an image of a naked man that he said the teacher identified as Prophet Muhammad.
In the video the father said his daughter was suspended for two days for refusing to leave the room, but Mr. Ricard said the principal had attributed her suspension not to the caricatures but to her behavior and tardiness. Efforts to reach the school were unsuccessful over the weekend.
The father called on people watching the video who “want to stand together and say, ‘Stop, don’t touch our children,’” to send him text messages. A call to the number he provided in the video went to an automated recording saying the mailbox was full.
Rodrigo Arenas, co-president of one of France’s national federations of parent-teacher associations, said he was alerted to the video two days later, because it was spreading quickly on social media. Complaints poured in from around the country. “When we heard this information in the morning we thought it was fake news,” Mr. Arenas said. “True or not, it was going viral.”
On Oct. 8, the father showed up at school with another man to complain to the principal, Mr. Ricard said. The principal “tried in vain to calm things down while the two men virulently demanded the firing of the teacher,” Mr. Ricard said. He added that the second man, who he said was known to French intelligence services, is in custody for questioning, along with his partner.
That same evening, the father posted a second video to social media, in which he gave Mr. Paty’s name and the address of the school, according to Mr. Ricard, and incited his contacts “to say, ‘Stop!’”
The father later went to the local police station along with his daughter to file a complaint for the “distribution of pornographic images,” Mr. Ricard said.
During an Oct. 10 interview with police, Mr. Paty strongly denied asking Muslim students to identify themselves and leave the room, Mr. Ricard said, telling police he only suggested students might want to look away from some images. Upon learning of the father’s video, Mr. Paty also filed his own complaint for defamation, Mr. Ricard said.
Two days later, the father published another video on social media, Mr. Ricard said. In it the daughter repeats her story. The other man who accompanied the father to the school also appears, saying President Macron has “stirred up hatred” against Muslims and threatening to mount protests if the teacher isn’t fired, according to Mr. Ricard.
Mr. Arenas, of the federation of parent-teacher associations, said that after the video, he quickly informed the mayor of the town to prepare for a protest that was potentially being organized in front of the school. The mayor ordered a police detail stationed in front of the school, and the protest didn’t take place, Mr. Arenas said. Mr. Ricard said the school also received threats.
The principal reached out to parents, and met with some to calm the situation, but the father refused to meet with the teacher, Mr. Ricard said.
On Friday, Abdoullakh Abouyezidvitch A. approached students outside the school to ask them to identify Mr. Paty, Mr. Ricard said. Born in Moscow, the Russian lived in France legally as a refugee and was known to police only for petty crimes as a minor, Mr. Ricard said. He lived in a town in Normandy, more than 40 miles away from the scene of the crime.
Local police found Mr. Paty’s body decapitated, with knife wounds to both the head and torso, close to the school and en route to the teacher’s nearby home, Mr. Ricard said.
—Noemie Bisserbe and Matthew Dalton contributed to this article.
Copyright ©2020 Dow Jones & Company, Inc. All Rights Reserved. 87990cbe856818d5eddac44c7b1cdeb8