PARIS — France, the nation that trademarked the term “Wars of Religion” in the 16th century, has a new fundamentalism problem. And it’s got less to do with hardcore Islamists than militant secularists.

Hard-liners — including a former prime minister, philosophers, eminent feminists, talk show pundits and politicians — have declared war on encroachments into public life by Islamists. Fair enough. But when they demonize Islam in general, as they so often do, they risk pushing young Muslims into the arms of the fanatics they abhor.

To make matters worse, these ayatollahs of secularism are jeopardizing President Emmanuel Macron’s efforts to fashion a more diverse and inclusive society, one in which Islam — the country’s second religion after Roman Catholicism — would be just as much at home as Christianity and Judaism.

The president said this month that he aims to reorganize the Muslim faith in France, shaking up its representative institutions and engaging religious leaders in a national dialogue on issues such as medical ethics.

At stake is the ability of the self-proclaimed “homeland of human rights” to integrate an estimated 5.7 million citizens of Muslim origin (8.8 percent of the population), most of them descendants of immigrants from former French colonies in North Africa. Other Western European countries face similar challenges, but France’s are starker because of unhealed wounds from the colonial past and the 1954-62 Algerian War.

“The specter of civil war looms everywhere” — French President Emmanuel Macron

“I want to lay the foundations for the whole organization of Islam in France,” Macron told Le Journal du Dimanche. He is still holding consultations, but aides said he wants to reform the way the French Council of the Muslim Faith is elected in order to open it up to more modern, integrated and younger leaders and reduce the influence of Saudi Arabia, Qatar, Turkey, Algeria and Morocco, which fund mosques, imams and associations in France.

Former President Nicolas Sarkozy, who set up the council, experimented with a modest dose of affirmative action a decade ago to promote Muslims but soon retreated into law-and-order identity politics under pressure from the far-right National Front. More liberal and less impatient by temperament, Macron has instead come under fire from secularist snipers on his left and right.

Macron stirred a hornets’ nest when he voiced concern recently that the secularists too were becoming “radicalized.” As a presidential candidate, he warned against “a revanchist vision of secularism which is above all about imposing prohibitions, mostly toward a single religion.”

“The specter of civil war looms everywhere,” the future leader said in a 2016 interview with the magazine Challenges.

He did not name names, but he clearly had in mind philosophers such as Alain Finkielkraut and Pascal Bruckner who have fueled a culture war with claims that French identity and values are under attack from Islam in general, not just from fundamentalists.

They have been joined by politicians including former Socialist premier Manuel Valls and National Front leader Marine Le Pen, who have railed against enveloping “burkini” beachwear for Muslim women, headscarves on university campuses, women-only swimming hours in public pools and halal meals in schools.

Two recent incidents highlight the way ultra-secularists are driving an agenda of exclusion.

The government rescinded the nomination of activist Rokhaya Diallo to a new national council on digital inclusion after an outcry over her links to “Les indigènes de la République” (“The natives of the Republic”), a group that campaigns against institutionalized racism.

Then, Mennel Ibtissem, a starry-eyed 22-year-old singer in a blue turban who caused a sensation with an Arabic version of Leonard Cohen’s “Hallelujah,” was hounded off the TV talent contest “The Voice” after secular activists uncovered tweets she wrote after the 2016 truck attack in Nice that questioned who was really behind the incident and said “the real terrorists are our government.”

The notion of a black leadership council or Muslim community elders, integral to U.S. society, is anathema to secular purists whose homogenizing tradition dates back to the Jacobin climax of the French Revolution, when Catholic priests who refused to abjure the church were guillotined.

The separation of church and state in a 1905 law was the culmination of a long struggle by anti-clerical republicans against the monarchist-leaning Roman Catholic church, discredited by its support for anti-Semites in the Dreyfus affair.

But the line is less clear cut. France may keep religion officially out of public life, but cultural Christianity nonetheless pervades much of French society. School holidays, for example, mirror the Christian calendar, ignoring Muslim and Jewish festivals.

While public debate is focused on issues like unregulated Salafist prayer rooms and schools that spread a sub-culture of radical Islam, too little attention is paid to the reality of routine discrimination that French people of Muslim origin face in the search for a job or an apartment.

“The presumption of belonging to the Muslim rather ... religion is an important discrimination factor in the French labor market” — Marie-Anne Valfort, researcher

The two are not unconnected. Many younger French Muslims feel alienated by the lack of economic opportunity and by racial discrimination among the police and hostility to Islam whipped up by politicians and media. Alienation and a desire for revenge, fanned from abroad by jihadi groups such as Islamic State, has driven a radicalized fringe of young Muslims to commit terrorist acts in which more than 220 people have been killed since 2015.

Marie-Anne Valfort, a researcher at the Paris School of Economics, has documented the ordeal faced by Muslim job-seekers, especially those who wear the headscarf. Although the law does not ban wearing religious garb in the workplace, her sampling found that “the presumption of belonging to the Muslim rather than the Christian religion is an important discrimination factor in the French labor market.”

This drives many young Muslims to seek work and housing within their own community, reinforcing segregation and exacerbating the discrimination they experience in France.

Those who express concern that shutting out talented young Muslims could alienate a substantial section of the population and play into the hands of fundamentalists are branded “Islamo-leftists” or “communitarians” by the secularists.

“The Muslim has replaced the Arab as the enemy,” said Nora Hamadi, a broadcaster who works with youth associations in suburban housing projects. “It’s incredible how the original definition of secularism has been twisted into an intellectual weapon.”

Hamadi, born in a working-class Paris suburb to Algerian immigrants, describes herself as “an atheist full of wine and pork.” But a 2004 law barring the wearing of headscarves in schools “felt like an anti-Muslim attack,” in contrast to respect for diversity in the United States and Britain.

To break France’s vicious circle and encourage the development of a moderate “Islam à la française,” some politicians and Muslim leaders have sensibly suggested a role for the state in training imams and some form of public funding for mosque-building and community centers. A small levy on sales of halal food could finance such activities, as exists now on kosher food to fund Jewish community institutions.

Historian Benjamin Stora, president of the Museum of the History of Immigration, said Macron could promote the integration of young Muslims without yielding to fundamentalists on either side by standing firm on secular values while ensuring that the history of French colonization is taught more honestly in schools.

“We never talk about the massacres and the subjugation,” Stora said. “That opens a highway for Islamists to say, ‘The West are bastards who always hated us.’ They step into that breach.”

Still, he added, France’s hysterical public debate conceals a more encouraging reality. France may still have too few people of African or Muslim origin on television and in parliament, but never before have so many young people of immigrant origin been integrated through education into the national elite.

“The problem is the time-lag between this change in French society, which helped produce the election of Macron, and its representation in the media and in parliament,” he said.

The secularist dogs may bark, but the caravan of integration is moving on.

Paul Taylor, contributing editor at POLITICO, writes the Europe At Large column.