The Socialist Party (PS) collected 36% in the second round of a poll to choose councillors in France’s 100 departments, according to nearly complete provisional results.
That outstripped Sarkozy’s UMP party on 20% and the far-right National Front (FN) on 12%.
But the vote was marred by a low turnout, with only 46% of those eligible to vote bothering to do so.
Socialist leader Martine Aubry’s speech to euphoric supporters gathered at the party headquarters in Paris, suggested the presidential campaign had already started.
“Today I am conscious of our duty of victory in 2012 for France and for the French,” she said.
The party would next week unveil fresh plans to get the country back on its feet, she announced. “Our determination is total to show that another France is possible,” she added.
For Francois Hollande, another leading Socialist, the writing was on the wall for the French president. “The lesson I draw from this vote is that the Nicolas Sarkozy page has been turned. The people of France want a new time, a new cycle,” he said.
Both Aubry and Hollande are seen as possible contenders for the Socialist candidacy for the presidency. But opinion polls still suggest that Dominique Strauss-Kahn, the current head of the International Monetary Fund, would be the strongest Socialist candidate, should he make a run.
Sarkozy’s UMP party made the best of a bad night. “In a context rendered difficult by two years of crisis, the candidates of the right and the centre have resisted well,” said Prime Minister Francois Fillon.
The far-right National Front did not break through in terms of seats won, its vote was up sharply.