On a visit to three towns in northern France last week, President Emmanuel Macron insisted he was not campaigning for Sunday’s regional elections. “I’m simply carrying on my work for the nation,” he said. Few believed him. The Hauts-de-France region north of Paris is led by Xavier Bertrand, a centre-right presidential hopeful and a potentially dangerous rival for Macron in next year’s election for the Elysée Palace.

The president needed a decent election result for his centrist La République en Marche party to clip Bertrand’s wings. So he pulled out the stops, adding no fewer than five ministers to the party’s regional list to beef up its appeal and scheduling his own visit to the area. But in Sunday’s first round vote, LREM flopped, winning only 9 per cent in Hauts-de-France, according to estimates, and failing to make the cut-off for the second round vote on June 27. Bertrand triumphed with 41 per cent, beating his far-right rival into a distant second.

Nationwide, Macron was the big loser from the poll even though the far-right Rassemblement National led by Marine Le Pen did much worse than expected, taking only 19 per cent of the vote and coming first in only one region, rather than the expected six. Macron’s party, which still lacks a grassroots organisation and the benefits of local incumbency, slid into fifth place with 11 per cent of the vote and failed to make the cut-off for the second round in several regions.

A proportional representation election for regional assemblies with only limited powers over transport, schools and economic development is an unreliable guide to next year’s presidential contest. Turnout was also very low at 33 per cent. But in two respects it was a warm up for the big race ahead.

“What’s at stake here is Emmanuel Macron’s capacity to present himself as rampart against Marine Le Pen,” said Chloe Morin, an analyst at the Fondation Jean-Jaures think-tank. “For Marine Le Pen, it is about the glass ceiling and breaking the idea that a high stakes election is unwinnable for her party.”

Sunday’s election suggests the glass ceiling is still tough to crack, although the far-right may still have a chance of winning in Provence-Alpes Cote d’Azur next weekend. Taking a regional council would be another step in the normalisation of the far-right which has moderated its policy positions in recent months. Le Pen’s opponents will hope that the far-right’s disappointing score will take some of the wind out of her sails.

Macron, meanwhile, has to worry about Bertrand, his most plausible rival on the centre right.

Presenting himself as the best-placed politician to defeat the far-right has been a core part of Macron’s political strategy from the outset. He proved it by winning the presidency convincingly in 2017. But after four turbulent years at the Elysée, and with French politics in a febrile state over perceived threats from lawlessness and Islamist terrorism, the menace from Le Pen is as strong as ever. Opinion polls consistently suggest she will win the first round of the presidential election in April next year and run Macron uncomfortably close in the second. They also suggest that Bertrand, a former conservative health and labour minister, would defeat her more easily than Macron.

By easily fending off the far-right in northern France, Bertrand has strengthened his claim to be better able to unite the nation against Le Pen. “Here we have loosened and smashed the jaws of the National Front [as the far-right used to be known],” he said on Sunday night. He was the rampart now, he added.

Macron would have hoped for a closer contest in the Hauts-de-France to be able to ride to Bertrand’s rescue in the second round. But Bertrand did not need his help. The centre-right Republicans strengthened their hold over other regions too, showing that France has tilted firmly in a conservative direction even if the left proved less moribund than thought. Bertrand can expect a big boost for his presidential campaign, assuming the Republicans fall in behind him. The duel between Macron and Le Pen has now become a three-way race.