PARIS — The French government is bristling at international criticism of its response to recent Islamist terrorist attacks, accusing foreign leaders and journalists of misrepresenting an attempt to target extremist violence on French soil as a crackdown on Islam. But some French Muslims say the government's own mixed messaging is to blame.

In the wake of the beheading of Samuel Paty, a middle school teacher who had shown his students caricatures of the prophet Muhammad, and the stabbing of three people inside a basilica in Nice, the French government has closed a mosque and is investigating more than 50 Muslim organizations it has accused of fomenting violence.

The actions follow a broader initiative unveiled by President Emmanuel Macron in early October to combat “Islamist separatism” and to “reform” the practice of Islam in France, mostly by targeting foreign funding for Muslim community organizations and by creating certificate programs for French-trained imams.

But in so doing, Macron called Islam a religion “in crisis all over the world” and said he seeks to create an “Islam of the Enlightenment,” comments that raised eyebrows in the Muslim world.

Amid the furor, the government has rejected accusations that it is Islamophobic and voiced exasperation at what it perceives as a smear campaign that amounts to little more than victim-blaming in a time of national mourning.

“We have no problem whatsoever with Islam, none at all,” said a diplomatic adviser to Macron who, like other aides, spoke on the condition of anonymity in keeping with protocol of the Élysée presidential palace. “This is about fighting Islamist separatism, and, frankly, it’s absurd that the message has not been transmitted, especially after four people have been killed in less than a month.”

Macron has taken particular aim at the foreign media, accusing it of presenting a distorted view of France’s relationship with Muslims. The Élysée struck back especially hard against critical op-eds published in the Financial Times and Politico, both written by Muslims. Both pieces have since been taken down, replaced by rebuttals from Macron and his surrogates.

French observers abroad say their country’s struggle with Islamist terrorism — more than 260 people have been killed in terrorist attacks in France since 2012, including 130 people in the devastating Paris attacks of Nov. 13, 2015 — is being discussed in ways that miss the point entirely.

“American friends often make this a debate about abstract principles — about secularism, about identity. But that’s not the issue at all,” said Benjamin Haddad, an expert in transatlantic relations at the Atlantic Council in Washington. “They don’t know the situation on the ground. It’s just about what behaviors you consider acceptable in society, and someone was actually beheaded.”

In his response to the Financial Times piece, Macron underscored France’s commitment to free expression but also appeared to delineate some boundaries. “We can do without media articles that divide us,” he wrote. “I will not allow anybody to claim that France, or its government, is fostering racism against Muslims.”

Prominent French Muslim faith leaders and intellectuals have largely endorsed Macron’s anti-separatism campaign, reiterating that there is no official discrimination against Muslims in France and speaking out in favor of France’s unique brand of state secularism, or laïcité. But some of these same voices note that members of Macron’s own cabinet have undermined his message on Islam with comments that come across as doublespeak.

After the beheading in the Paris suburb of Conflans-Sainte-Honorine, Interior Minister Gérald Darmanin took aim at stores selling halal and kosher meats, identifying them as “communitarian cuisine” that fosters precisely the kind of “separatism” Macron has pledged to fight.

“That’s [Darmanin’s] opinion, not the line of the government,” a Macron aide said. But Darmanin is in charge of the government’s crackdown on Muslim organizations suspected of supporting terrorism, and Macron has not publicly reprimanded him.

That kind of comment, said Tareq Oubrou, the chief imam of Bordeaux and one of France’s leading voices for an integrated French Islam, “creates a confusion between religious practices and the fundamentalism that leads to terrorist violence.”

Oubrou said it represents “a confusion present for a long time — on the difference between Islam and Islamism. Many people think that practicing Muslims who don’t eat pork and who don’t drink alcohol are somehow Islamists. That’s just the practice of Islam.”

Likewise, French Education Minister Jean-Michel Blanquer has railed against what he called “Islamo-leftism” in French academia, which he cast as an unwelcome importation of the “Critical Race Theory” popular on certain U.S. university campuses.

The Élysée has sought to distance Macron from the term, saying he has never used it. But Macron has also not publicly disavowed it or discouraged his ministers from repeating it.

Rachid Benzine, a French Moroccan writer and advocate for a liberal Islam, said such comments reflect the political elite’s ignorance about the reality of the Muslim faith, the second-largest religious group in France.

“Simply put, it’s stupidity. I don’t have any other word for it than stupidity,” Benzine said. When ordinary Muslims hear such comments, he said, “they are injured.”

“There’s a misunderstanding of a religion, but also of an entire portion of the population,” Benzine said. France’s Muslim population is estimated to be approximately 6 million, believed to be the largest in Europe.

“There is broad agreement on both sides that extremism has to be addressed,” said Rim-Sarah Alouane, a French legal scholar and expert in religious freedom. “But what is concerning is the lack of nuance from the government that results once again in Muslims feeling as if they are guilty until proven innocent.”

Valérie Pécresse, president of the Paris region, said in an interview with France Info after the recent violence that “all our Muslim compatriots” should publicly declare that the attacks “were not in their name.”

Amid a mounting security threat, Macron aides are doubling down on their strategy against separatism even as they take aim at international press coverage that they view as biased and myopic.

Stephen Brown, editor of Politico Europe, said in a statement that he withdrew the piece in question because it “did not meet our editorial standards.” The piece was written by a French Muslim academic and said “France’s extreme form of secularism and its embrace of blasphemy” were fueling “radicalism among a marginalized community.”

The Financial Times said it pulled its op-ed — which argued that Macron’s stance on fighting Islamist violence “serves the far right and its electoral interests” — because of factual inaccuracies discovered after publication.

“The article’s removal had nothing to do with the views expressed by the writer, who is an FT journalist,” the newspaper said.

The Élysée called the op-ed “fake news” and said it did not put pressure on the publication or try to limit free expression.

French academics have voiced concern that the government’s campaign could constrain free inquiry in France.

The French Senate last month went so far as to pass an amendment that would curtail certain academic freedoms to “align with the values of the republic.” The proposed amendment will still have to face scrutiny in the National Assembly, but the debate was enough to sound the alarm in prominent French universities.

“The defense of democracy in the face of jihadist-inspired terrorism and fundamentalist temptation cannot consist of a witch-hunt based on the gruesome assumption that terrorists have been guided by ‘postcolonial studies,’ ” read an open letter in Le Monde, signed by some leading intellectuals, including Thomas Piketty and Pierre Rosanvallon.

“It must be a defense of pluralism and the freedom of science.”