The far-right National Front (FN) party has rattled the French political establishment by making significant gains in local elections.
President Francois Hollande's ruling Socialists lost ground overall, as turnout slumped to a record low of 61%.
The FN won a clear majority in Henin-Beaumont, a northern former coal-mining town. It did well in the south too.
PM Jean-Marc Ayrault has urged voters to back any candidate best placed to beat the FN in the second round.
The Socialists have now announced that they will join forces with the Greens and the Communist Party in an effort to block FN advances in the second round, AFP news agency reports. It will mean the three parties fielding combined electoral lists.
The FN, an anti-EU party demanding tough curbs on immigration, took the lead in Avignon, Perpignan, Beziers and Frejus in the south. It was also in second place in Marseille.
Results are still being counted and the second round of voting will take place next weekend.
Nationwide the opposition centre-right UMP and allies took 47%, the Socialist Party and its allies took 38% and the FN was on 5%.
There was some consolation for the Socialists in Paris, where their candidate for mayor, Anne Hidalgo, may still beat her conservative rival Nathalie Kosciusko-Morizet. That contest looks set to be very tight.
The FN vote was proportionately high, as its candidates ran in just 600 out of some 36,000 constituencies, Reuters news agency reports.
The BBC's Hugh Schofield in Paris says the FN will have little chance of gaining control of town halls in the second round. But he says it is a big advance for them and an expression of growing exasperation with the traditional parties of right and left.
The FN is widely expected to do well in the European Parliament elections in late May - and opinion polls suggest the Eurosceptic party is on course to come top.
It was the first major electoral test for President Hollande, who is deeply unpopular after nearly two years in power.
The ballot is to choose councillors and mayors in more than 36,000 villages, towns and cities.
The FN took 50.26% of the vote in Henin-Beaumont, which has historically voted for the left.
In some 200 places FN candidates have won through to the second round.
Marine Le Pen, FN leader since 2011, hailed the results, saying her party had "arrived as a major independent force - a political force at both national and local level".
Many people who voted for President Hollande two years ago chose to abstain, which has meant losses for the Socialists, our correspondent notes, and in many important towns they will struggle in the second round to hold off challenges from the UMP.