A CRUSHING defeat at French local elections has intensified pressure on François Hollande to reshuffle his government. At a second round of voting on March 30th, Mr Hollande’s Socialist Party lost over 150 towns, most of them to the opposition centre-right. This morning, the French president was holed up at the Elysée, the presidential palace, consulting close advisers over reshuffle plans, which could be announced as early as today. The Socialist losses were devastating. Although, as expected, the party hung on to Paris, where Anne Hidalgo becomes the capital’s first female mayor, the rest of the country snubbed the ruling party. Among the more dramatic losses were Toulouse, a city in the south-west that it had thought was safe, Roubaix and Tourcoing, two industrial cities in the north with a deep left-wing heritage, and a string of other cities, including Amiens, Caen, Tours, Reims and Limoges, held by the left since 1912. Even some towns in the Paris region, which had been governed by Communist Party since the second world war, such as Villejuif, swung to the right.

The centre-right UMP was the primary beneficiary of this disillusion, and of a high abstention rate. Overall, the second-round result gave the combined mainstream right 46% of the vote, compared with 40% for the Socialists, Greens and other left-wing parties. This translates into 572 mayors for the right in towns of a population over 10,000, to 349 for the left, reversing the outcome in 2008. Jean-François Copé, the delighted head of the centre-right UMP party, called the result a “blue wave”.

The other second-round victor was Marine Le Pen’s populist National Front. To add to Hénin-Beaumont, a town that her party already won outright in a first-round vote on March 24rd, she picked up ten others. They include Fréjus and Béziers in the south, a string of smaller towns, and an arrondissement of Marseilles that represents fully 150,000 people. The only town that had looked winnable but which the National Front failed to grab in the end was Forbach, where her party’s number two, Florian Philippot, was standing.

Although the overall second-round result gave the National Front only 7% of the countrywide vote, this crop of town halls is a historic result for Ms Le Pen’s party. In 1995, when the front was on the rise under her father, Jean-Marie, it won just three towns. Ms Le Pen has also secured over 1,200 municipal-council seats, giving her both a local base in which to anchor the party and a training ground to prepare National Front officials for future electoral contests. The front could well come top in elections to the European Parliament in May.

Unlike in the first round, when the government seemed only belatedly to grasp the scale of its losses, Jean-Marc Ayrault, the sitting prime minister, said this time that it was a “moment of truth”, and a clear “defeat”. In 2001, the Socialist Party tried to brush off a similar defeat at local elections by focusing attention on Paris, which it had captured from the right. A year later, the Socialists went on to lose their place in the run-off of the presidential election to Mr Le Pen. This time, Mr Hollande looks likely to acknowledge the disaster in a televised address, and pick a fresh team.

A new government could be announced this week, even today. It is likely to have fewer ministers, and to include some veterans, such as Ségolène Royal, Mr Hollande’s former partner and a former defeated Socialist presidential candidate. The greatest difficulty will be finding the right prime minister. Neither of the two most obvious candidates to replace Mr Ayrault would be risk-free for Mr Hollande. Manuel Valls, the interior minister, a liberal, is distrusted by the party’s left wing and the Greens, and has presidential ambitions of his own. Laurent Fabius, who held the job 30 years ago, is an old foe of Mr Hollande’s so cohabitation between them could be stormy.

This is why speculation continues to return to the possibility that Mr Ayrault could keep the job, if some big names were brought in elsewhere. Pierre Moscovici, the finance minister, looks likely to be replaced. Among names circulating in Paris are that of Emmanuel Macron, Mr Hollande’s economic adviser. The president is keeping his cards close to his chest—he is more secretive than even François Mitterrand, the previous Socialist president, says one former Mitterrand adviser. A surprise nomination cannot be ruled out.

The new government will not only face fresh electoral difficulty at European polls in May. Before that, in mid-April, France must submit its spending plans to the European Commission, and it has promised to spell out €50 billion ($69 billion) of public-spending savings in 2015-2017, including an extra €10 billion or so in a payroll-tax cut to companies as part of a job-creating “responsibility pact”. Whatever Mr Hollande’s choice of government, its greatest challenge will be to explain to the left wing why its response to electoral defeat will be tax cuts for business and austerity.