President Francois Hollande was set to name Interior Minister Manuel Valls as prime minister, replacing Jean-Marc Ayrault, reports said last night, a day after the ruling Socialists suffered losses in local elections in which the anti-immigration National Front made historic gains.
Ayrault's office said he had resigned as prime minister.
A government reshuffle was widely anticipated given the poor showing in elections and the record unpopularity of Hollande, struggling to reverse a rise in unemployment and to spur growth in the euro zone's second-largest economy.
The outcome of the first nationwide vote in France since Hollande was elected in 2012 was described as "Black Sunday" by one Socialist lawmaker.
The National Front won control of 11 towns and was on track to claim more than 1,200 municipal council seats nationwide, its best ever showing at the grass-roots level of French politics and a vindication of leader Marine Le Pen's efforts to extend its appeal.
It was also a night to savour for France's main opposition, the centre-right Union for a Popular Movement (UMP).
The party of former president Nicolas Sarkozy performed strongly across the country, seizing control of a string of towns and cities, including some which had been considered bastions of the left.
Limoges, a town that had been run by the left for 102 years, fell to the UMP, as did Toulouse, the Champagne capital Reims and Saint Etienne. A total of 155 towns with more than 9,000 residents swung from left to right.
"It has been a black Sunday," said Socialist deputy Jean-Christophe Cambadelis.
The biggest towns won by the National Front candidates it backed were Beziers and Frejus in the south. The mayor's seat in a district of Marseille was among eight others gained.
"We have moved onto a new level," Le Pen said. "There is now a third major political force in our country. We will destroy this idea that the National Front represents some sort of threat to the republic. Our elected candidates will show that they are good mayors."
Nationwide, the UMP and its allies took just under 46 per cent of the votes cast nationwide.
The Socialists and other left-wing parties took 40.5 per cent. The National Front and some smaller far-right groups took 7 per cent.
"We have had a very severe warning," said Segolene Royal, Hollande's former partner, who is tipped for a return to government in the expected reshuffle. The National Front's success has been interpreted as reflecting exasperation among voters with the Hollande government.
The Socialists' failure to boost the economy and reduce unemployment is seen as having aggravated anger over other issues, such as crime and immigration.
Ayrault had been expected to be made the principal scapegoat for the government's failures.
Adding a bit of soap opera drama is the likelihood of a comeback by Royal after Hollande's separation from Valerie Trierweiler in January.
Trierweiler, who was dumped after it emerged Hollande was allegedly having an affair with actress Julie Gayet, had reportedly wielded a veto over Royal's mooted inclusion in Hollande's first cabinet. But now, the mother of Hollande's four children is being tipped to get a new portfolio, including education.
Meanwhile, the National Front faces a test of its ability to run the towns it won.