French local elections have delivered a blow to President François Hollande's ruling Socialist party and pushed ahead Sarkozy's UMP and its allies.
The UMP and allies were all set to take over a third of the 102 local "departements".
The far-right anti-immigrant, anti-Europe National Front (FN) played a key role in delivering the third drubbing to the Socialists with 62 of its candidates elected to the 4,108 local council seats.
A departement however eludes the party. Up from the one seat it holds now, but less than 2 percent of the total the FN had hoped to win at least two "departements".
The party's leader Marine Le Pen saw "foundations for big victories of tomorrow" in the party's performance.
The local elections are viewed as an indicator of what could happen in the 2017 presidential polls.
While many polls have shown that Le Pen could make into the second-round of the presidential runoff vote in 2017, opinion is divided on whether she can make it to the final rounds.
The FN is banking on building a base of locally elected officials to contest the national ballots.
In total, 4,108 councillors with limited powers over roads, schools and social services were elected in the two rounds of local elections.
The voting system sees a duo of councillors elected per constituency who will then elect the presidents of 98 "departement" councils.
A clear picture of which party wins how many councils will emerge only slowly.
"The French people have massively rejected the policies of [President] Francois Hollande and his government," Sarkozy told party supporters. "The time for change is now."
The former president has been catapulted into the limelight despite the in-fighting in the party and many allegations of financial scandals.
The Socialist Prime Minister Manuel Valls, meanwhile acknowledged that many lessons were to be learnt in the "too high" score of the far-right. Some of the traditional bastions of the party have also fallen to the right.
The Socialists are on track to lose around 30 of the 61 local departements that they currently head.