PARIS — The suspect within the beheading of a historical past trainer in a Paris suburb was an 18-year-old immigrant of Chechen descent who was angered by the classroom show of caricatures of the Prophet Muhammad, French officers mentioned on Saturday.
The suspect, recognized by the authorities as Abdoulakh A., stalked the realm outdoors the varsity on Friday afternoon earlier than following the trainer, whom he stabbed and decapitated with a knife, Jean-François Ricard, the highest antiterrorism prosecutor, mentioned at a information convention.
“The individual was in front of the college in the afternoon and asked students to indicate the future victim to him,’’ Mr. Ricard said, referring to the middle school where the teacher, Samuel Paty, had taught. The suspect was fatally shot by the police in a confrontation soon after the killing, which took place in Eragny, a suburb near the school.
Investigators found a message planning the attack on the suspect’s cellphone, written a few hours before, Mr. Ricard said. Then, shortly before he was killed by the police, the suspect uploaded a photograph of the victim to Twitter, he added.
The gruesome killing appeared to be the culmination of a couple of weeks of tension at the school, Collège du Bois-d’Aulne, in a quiet, middle-class suburb north of Paris. Muslim parents upset over the classroom display of two caricatures published by the satirical magazine Charlie Hebdo had contacted school and police officials, but videos uploaded on social media by one father widened the dispute to an outside audience.
Investigators were still trying to piece together how the suspect spent his days before the attack, Mr. Ricard said. But the suspect did not appear to have any direct ties to the school or to have been previously involved in the dispute.
Born in Moscow, the suspect lived in France with the status of a refugee, Mr. Ricard said, adding that he was not known to antiterrorism officials.
The brutal killing was the second violent episode within weeks to be linked to the caricatures published by Charlie Hebdo, which had led to deadly attacks in Paris in 2015. Last month, as the trial of accomplices in the 2015 attack got underway, the magazine republished the drawings — an act that was seen as a bold statement in the name of freedom of expression by some but as reckless and unnecessary provocation by others.
Last month, a 25-year-old Pakistani immigrant attacked two people outside the former offices of Charlie Hebdo, apparently angered after watching videos showing protests in Pakistan against the republication of the cartoons.
Beyond its brutality, Friday’s killing hit a far bigger nerve in France as President Emmanuel Macron and other top government officials rushed to the scene on Friday evening.
Jean-Michel Blanquer, the minister of national education, said that in Friday’s killing, it was “the republic that was attacked.’’ France said a ceremony would be organized to pay national homage to the slain teacher.
The minister’s words reflected the central role played by France’s public schools — hewing to a national curriculum established by the central government — in instilling civic values and a national identity. But they also underscored the recurring tensions between France’s traditional republican values and those of newer arrivals, especially those of Muslim faith who oppose the publication of the caricatures.
The tensions at Collège du Bois-d’Aulne emerged early this month as the teacher — who was 47 and, according to parents and students, had taught at the school for only few years — broached the topic of freedom of expression.
To illustrate the topic, the teacher showed his students — mostly 13-year-olds — two caricatures of the Prophet Muhammad that had appeared in Charlie Hebdo, Mr. Ricard said. According to an email sent later to the parents by the school principal, the teacher asked students who might be offended by the material to look away or to temporarily leave the classroom. The teacher realized his clumsiness and apologized, according to the email, which was obtained by The New York Times.
Cécile Ribet-Retel, the president of PEEP de Conflans, the local chapter of a national parents’ association, said her group heard from about 20 parents, who expressed their anger or their support for the teacher. Parents met with school officials and both sides appeared to be working toward an understanding, Ms. Ribet-Retel said.
“But then the information got on social media, was amplified and distorted,’’ Ms. Ribet-Retel said. “And it became impossible to manage.’’
One particularly vocal parent — the father of a 13-year-old girl who was upset by the caricatures — met with the principal and demanded that the teacher be fired, Mr. Ricard said. The father uploaded critical and angry videos on social media on Oct. 7 and Oct. 12, identifying the teacher and the school, he said.
Laurent Brosse, the mayor of Conflans-Sainte-Honorine, the Paris suburb where the school is, said local officials warned police intelligence that the situation appeared to be spiraling out of control because of the video.
“We did what seemed important to us at that moment,’’ Mr. Brosse said, adding, “We know that this question about the freedom of expression stirs up tensions in society.’’
But despite these warnings, “there was no action,’’ Ms. Ribet-Retel said.
The video was widely shared on social networks by individuals denouncing anti-Muslim racism and even official accounts of mosques and of Muslim organizations.
“It was blown out of proportion in the Muslim community,’’ said Siham Touazi, a councilor in an adjoining municipality, who received messages linking to the video in several WhatsApp groups.
The killing came just weeks after Mr. Macron unveiled a plan to combat what he described as the threat of “Islamist separatism” to France’s secularism. Mr. Macron centered partly on schooling, particularly on beating again what he described as threats to the secular values taught within the nation’s faculties and citing the instance of Muslim mother and father who had been against letting their kids take swimming classes.
“The situation has become so tense in our country over the issues of secularism and Islam that it’s become impossible to have a reasonable conversation,’’ said Gérard Pommier, the national president of PEEP, the parents’ association.
The slain teacher — described by Ms. Ribet-Retel and many current and former students as a committed and serious instructor — appeared to try to navigate the tensions in his class on freedom of expression. While he showed two caricatures to his class, he suggested that those who might be offended — implicitly Muslim students — leave or look away. In France, where it is illegal to ask people their religion, the teacher’s proposal seemed to violate the country’s secularism, said Rodrigo Arenas, co-president of the F.C.P.E., another parents’ association.
Aude Clabaut, a teacher at another school in the area, said that the slain teacher should not have asked students to leave the classroom. But she said that she was frustrated by the growing challenges to secularism in her own classroom, with some students refusing to remove their veils and Muslim parents contesting secularism courses.
“I am sad and I am furious,” mentioned Ms. Clabaut, who joined a gaggle of individuals on Saturday in entrance of the varsity the place the slain trainer labored.
Hundreds of scholars and oldsters, in addition to residents of town, gathered to pay tribute to the trainer, at one pointing singing La Marseillaise, the nationwide anthem.
Some held indicators that learn “I am a teacher,” in direct reference to the “I am Charlie” help indicators that popped up by the hundreds hours after the 2015 assault on the journal. Several college students hugged one another, their eyes swollen with tears.
But tensions had been additionally current on Saturday afternoon, as some didn’t hesitate to immediately level to Islamism. A person holding an indication — “ Political Islam is a cancer. We eliminate it or we die from it” — was briefly interrogated by the police and had his signal seized.
Constant Méheut reported from Conflans-Sainte-Honorine. Antonella Francini contributed analysis from Paris.