THREE huge terror attacks in 18 months would challenge the spirit of any country.

The Charlie Hebdo magazine massacre in January, 2015, was followed by the Paris attacks in November of that year, when 130 people were killed, and a third episode of carnage, in Nice, on Bastille Day, this July 14, when 84 people were killed. A week ago, on July 26, an 84-year-old priest celebrating mass was murdered, near Rouen. France is in the midst of a terrifying escalation of violence.

The French seem clueless as to how to deal with what has become a seemingly endless cycle of violence. An isolated immigrant population and a strident, right-wing political faction, in a country awash with guns, has created a toxic and explosive mixture. President François Hollande has declared the nation at war. His rival, former president, Nicolas Sarkozy, has called for a “pitiless” response. Could France, a nation long-considered a beacon of liberty and stability, be on the edge of something resembling a civil war?

I wish I could say this was 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 legal for members of such clubs to own pistols and semi-automatic rifles.

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

“They’re getting ready for a war,” he said.

This sounds crazy, but, even before the 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.

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 neighbours. I’ve mastered the language, and have even been elected to the local council. So my observations are not a tourist’s snapshot. I talk to 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 neighbours 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 three children. Since then, nationally, there have been 14 further attacks, with 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 just 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.

Manuel Valls, the prime minister, further infuriated my neighbours 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, Sarkozy, have done anything to address the chronic unemployment of young French Muslims, said to be at more than 50%; 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 organised 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 turn into something much nastier.

France is a schizophrenic nation, at once declaring itself revolutionary, yet with a horror of change.

Its ability to make peace with its excluded immigrant community, by opening its economy and creating opportunities for young, disenfranchised men, must be doubted.

I fear we have not seen the last of these horrors and, as violence begets violence, and a sclerotic state continues to fail to offer solutions, the forecast is grim.

Jonathan Miller is an elected city councillor in southern France, and the author of France, a Nation on the Verge of a Nervous Breakdown, available from all good bookstores (bit.ly/franceontheverge)