What next? Could France be facing a civil war?

Two huge terror attacks in a year would be enough to challenge the spirit of any country.

As if the Charlie Hebdo massacre in January 2015 and the Paris attacks in November were not enough, a third episode of carnage in Nice on Bastille Day, July 14, has shaken France to the brink of a terrifying escalation.

An isolated immigrant population and a strident right-wing political faction in a country awash with guns has created a toxic and explosive mixture. France, a nation long considered a beacon of liberty and stability, may be on the edge of something resembling a civil war.

I wish I could say this was just hysterical exaggeration. But the evidence does not support complacency. Just down the road from me on the outskirts of Montpellier on the shores of the Mediterranean Sea, there's long been a gun club where enthusiastic game hunters can polish their skills during the off-season. Unlike in Britain, it is perfectly legal for members of such clubs to own pistols and semi-automatic rifles.

In the last few months, since the wave of terrorism has intensified, the membership of the gun club has quadrupled, from 200 to 800 members. The new members are not all motivated by the love of shooting sports. Benoit, a local olive farmer who owns more than a dozen rifles, pistols and shotguns, as well as an AK-47 assault rifle, admitted to me this weekend something much darker.

"They're getting ready for a war," he said.

This sounds crazy, but last week, even before the latest atrocity in Nice, it was revealed that Patrick Calvar, a senior French intelligence official, had told a parliamentary committee that one more incident could provoke a bloody civil conflict in this country.

Marine Le Pen, leader of the anti-immigrant National Front, does nothing to calm these fears.

"The war against Islamic fundamentalism has not yet begun. Now it is necessary to urgently declare it," she said last week.

As a Brit who has lived in France for 15 years, I like to think I know my neighbors pretty well. I've pretty well mastered the language, and have even been elected to the local council. So my observations are not a tourist's snapshot. I talk to a lot of people at every level of French society and I am detecting a change of mood. And the mood is turning nasty.

Normally, it takes quite a bit to excite my neighbors under the languid southern sun, but as one horror has followed another, I am no longer taking for granted that they will put up with this much longer.

In March 2012, in Toulouse, a large city not far from here, three gun attacks targeted French soldiers outside their barracks, and a Jewish school. Seven people were killed, including 3 children. Since then, there have been 14 further attacks with more than 250 people killed and 600 injured.

In the ancient coastal city of Beziers, 20 minutes from Montpellier, voters recently elected a mayor, Robert Menard, a former journalist, who is in open sympathy with the right-wing National Front. In my own village, at the last regional elections, more than half our citizens cast ballots for the extreme right. Are they neo-fascists? Not really. They are frightened.

Traditional politicians are failing France's citizens. The president, Francois Hollande, has so far responded feebly to this. After the massacre at Charlie Hebdo magazine, he suggested that radicalism could be avoided by making school children recite a pledge of allegiance to the French state.

Clément Mahoudeau/IP3/Getty Images

Last week, Manuel Valls, the prime minister, further infuriated my neighbors by suggesting that they should just "learn to live" with terrorism. No wonder the extreme nationalist politicians are gaining ground. France has become a pressure cooker of resentments, yet day to day, the Muslim population is arguably suffering more than anyone, suffering from the worst housing, the most inadequate education and the highest unemployment.

Neither Hollande nor his predecessor, Nicolas Sarkozy, have done anything substantial to address the chronic unemployment of young French Muslims, said to be over 50 percent; nothing to reprimand right-wing mayors who refuse to offer alternatives to pork in school cafeterias; nothing to curb the casual racism shown to young people of North African origin by the overwhelmingly white police. Indeed, they have made it worse, even forbidding Muslim women from wearing head scarves in public.

And none of those maneuvering to replace Hollande in next year's presidential elections have yet shown they have a clue what to do, either. Whether the latest atrocity in Nice was organized by the so-called Islamic State or was just another horrible expression of rage and frustration by a man of North African origin hardly matters. The mood in France is turning from resignation to anger.

After repeated failures to prevent attacks, confidence in the intelligence services is close to zero. It could be only a matter of time before liberty, equality and fraternity turns into something much nastier.

Jonathan Miller is an elected city councilor in southern France, and the author of "France, a Nation on the Verge of a Nervous Breakdown."

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.