Fréjus, France // As French voters delivered a mid-term humiliation to Francois Hollande’s socialist government, forcing his prime minister’s resignation, elections at the weekend also revealed a remarkable phenomenon: Muslims voting with the far right, anti-immigration Front National (FN).

Marine Le Pen’s party, which took control of 11 town halls across the country, is seen by critics as anti-Islam and even racist.

The party claims to be neither. But it was previously unthinkable that French Muslims with roots in the Maghreb, other than the families of Harkis, who fought with France in the Algerian war of independence, would dream of supporting it.

Equivalents would arguably be African Americans voting for the Ku Klux Klan or British miners supporting Margaret Thatcher.

One triumphant FN mayor, Steeve Briois, who won in the northern town of Hénin-Beaumont with more than half the vote, assured a French television reporter: “We don’t eat children.”

But Ms Le Pen’s determined campaign to “de-demonise” the image of her party has not convinced everyone. Her father, Jean-Marie, the founder of the FN and notorious for Holocaust denial and anti-Islam comments, remains the party’s “president of honour”.

In the Riviera resort of Fréjus, where one of Ms Le Pen’s young supporters was the winner in second-round voting to be become mayor, there was a mixed reaction.

Riot police were on duty as tensions rose when opponents as well as well-wishers gathered after the declaration. A small group of protesters hurled insults outside the FN’s campaign office; its supporters responded by singing the French anthem, La Marseillaise.

Earlier, a group of Muslim council workers watching as media gathered outside the Fréjus town hall had explained the unexpected appeal of the FN to Maghrebins.

“People want change,” said one of them, Karim, 40, born in France but brought up in his parents’ native Algeria.

He said he knew Muslims who had voted FN but would not disclose whether he was among them, saying only: “The main left and right parties have failed them. But for many Muslims, the moves towards legalising gay marriage would be enough by itself to vote for a party like the FN that opposes it too.”

The new mayor, David Rachline, 26, insisted his party would run the town in a way that treated all 52,000 inhabitants equally “irrespective of their origins, religion, politics or social status”. He had earlier told The National he knew “quite a number” of Muslims who, sharing the FN’s concerns about France’s political and economic malaise, had promised him their votes.

In the north-eastern town of Forbach, where the FN fell short of another dramatic victory, a former miner identified as Ahmed, 53, described his attraction to Ms Le Pen’s politics.

“It might seem bizarre for an Algerian’s son,” he told the daily newspaper Aujourd’hui en France.

“But my vote is a sanction. We give far too many handouts [to foreigners] in France and not enough to the French. I wanted to see at least once what the FN would make of being in power.”

The appeal of the FN to some Muslims has previously been charted by the France 24 television network.

Farid Smahi, whose father fought with the French army in World War II but later against them as Algeria battled for freedom, told the channel a million people of Arab background voted for Ms Le Pen in the 2012 presidential elections.

Mr Smahi, a former FN official who has also worked among disadvantaged people in immigrant-dominated Parisian suburbs, believes such support comes mainly from educated or skilled Maghrebins who have arrived in France relatively recently rather than those born here. His estimates of voting patterns would be difficult if not impossible to verify.

There is more recent evidence, including blogs and YouTube clips, that confirm the surprising electoral choice made by some French Muslims. A Facebook page entitled “We are Muslims and proud to vote Marine Le Pen” has attracted nearly 1,600 “likes” in 11 months, though anti-Muslim comments have also been left by some visitors.

The appeal of the FN to Muslims should not be overstated. Many more will have been among the 36 per cent who cast no votes at all in the municipal elections, a record abstention rate.

But that is of little comfort to Mr Hollande, who yesterday reshuffled his government in recognition that the vote was, as one newspaper headline put it, a “mighty slap”.

Mr Hollande confirmed last night that his outgoing prime minister, Jean-Marc Ayrault, would be replaced by the interior minister, Manuel Valls, whose hardline views on immigration and security appeal more to conservative voters.

Unemployment, dwindling spending power and concerns about crime and immigration have made Mr Hollande the most unpopular president in modern times. Some 170 towns of more than 9,000 inhabitants passed from left to right in Sunday’s voting, with the mainstream Gaullist opposition party, the Union for a Popular Movement, the chief beneficiary.

Anne Hidalgo, a rare success for the socialists, successfully defending left-wing control of Paris to become the capital’s first female mayor, said Mr Hollande had no choice but to act. “We need really strong changes to the entire [government] team,” she said on French radio. “What I heard during the campaign was a demand for greater efficiency.”

The advances made by the FN in several of the towns it had targeted prompted Ms Le Pen to herald the end of a simple left-right divide in France.

Her party is expected to make further progress in forthcoming European parliamentary elections, and Ms Le Pen’s eyes are increasingly fixed on a serious presidential challenge in 2017.

foreign.desk@thenational.ae