PARIS — French authorities detained nine people Saturday in connection with the gruesome beheading of a teacher who had shown students caricatures of the prophet Muhammad, which is strictly prohibited by Muslim law.

The Friday attack immediately captivated the attention of a nation otherwise distracted by a rapid resurgence of the novel coronavirus and the imposition of a mandatory evening curfew in a handful of major cities, including Paris.

As further details emerged, the incident reignited some of the most explosive debates in the French national lexicon: the value of free expression in a country that, unlike the United States, does abide by hate-speech laws, and the place of Islam in a nominally secular but post-colonial society in which Muslims are among the largest minority groups.

French authorities identified the victim as 47-year-old Samuel Paty, who taught both history and geography at a school in the northwestern Paris suburb of Conflans-Sainte-Honorine. The assailant, who was shot dead by police, was identified as Abdoulakh A., an 18-year-old Moscow-born immigrant of Chechen descent who carried out what President Emmanuel Macron did not hesitate to call an “Islamist terrorist attack.”

“This is our battle, and it is existential,” Macron said late Friday, speaking from the scene of the crime.

French authorities commonly do not disclose the surname of suspects.

Police detained four of the suspect’s relatives soon after the attack, according to Reuters. Five more people were detained overnight, including the father of a pupil at Paty’s school, College du Bois d’Aulne, and an acquaintance of the pupil’s father known to the intelligence services.

Jean-François Ricard, France’s top anti-terrorism prosecutor, said at a news conference Saturday that a photo of the teacher’s body was found on the assailant’s cellphone. The image was posted to Twitter with a statement claiming responsibility for the attack “in the name of Allah.” The post has been removed, and Twitter has suspended the account.

The attack in Conflans-Sainte-Honorine, a quiet, middle-class enclave, is the latest iteration of what has become an all-too-frequent plotline in France: the public airing of Muhammad cartoons followed by deadly revenge.

In fact, Paty had recently shown his students caricatures of Muhammad precisely because of that legacy, as part of a lesson on free expression in the midst of the ongoing Charlie Hebdo trial.

Last month saw the opening of the long-awaited trial of 14 alleged accomplices in the January 2015 attack on the offices of Europe’s most famous satirical newspaper, which had been targeted by two French al-Qaeda affiliates because it had previously published Muhammad cartoons. Twelve people, including nine journalists from the newspaper, were killed.

To mark the beginning of the trial, Charlie Hebdo again published a symbolic cover with Muhammad cartoons.

Paty’s decision to show these drawings to teenage children raised eyebrows, with some Muslim parents complaining to the school’s leadership, French media reported. One of the offended parents took his dispute to social media, which is probably how the suspect — who had no known ties to the school or to that parental dispute — learned of the issue, authorities suggested.

But according to some parents, Paty had also tried to be as sensitive as possible to offensive potential of the images he wanted to discuss.

Nordine Chaouadi, a parent of a 13-year-old in Paty’s class, told Agence France-Presse that he had allowed Muslim students to leave the classroom during the discussion.

“At no point did he want to be disrespectful — that’s what my son told me,” he said.

Ricard said at the news conference that the suspect was lurking outside the school earlier on Friday afternoon, and that he asked students to point out Paty as they left. He then decapitated his victim.

The attack also comes amid Macron’s push to combat what he called “Islamist separatism” in a major speech earlier this month. Broadly conceived, “reforming” Islam has been an elusive policy aim of French presidents since the late 1980s, but recent events will probably cast it in a more urgent light.

Beyond the Friday attack, the opening of the Charlie Hebdo trial saw another attack late last month: A 25-year-old Pakistani immigrant stabbed two people outside the former offices of the newspaper, which he did not realize had moved to a new location.

Macron declared a national remembrance for Wednesday, and a demonstration in honor of Paty is scheduled for Sunday afternoon in Paris.

In a statement, Charlie Hebdo expressed a “sense of horror and revolt after a teacher in the line of duty was murdered by a religious fanatic.”

“We express our deepest support to his family, his loved ones and all teachers.”