France's ruling Socialists have taken a new hit in run-off local elections that saw major gains for the right ahead of 2017 presidential elections.

Former President Nicolas Sarkozy's Union for a Popular Movement (UMP) won a thumping victory, taking between 65 and 71 councils out of a possible 98 in Sunday's elections, the AFP news agency reported, citing a number of poll projections.

Left-wing parties were projected to win only about 30 councils.

"Never ... has our political family won so many councils," Sarkozy told cheering supporters, adding that voters had "massively rejected the policies of Francois Hollande and his government".

Sarkozy's decision to align his right-wing UMP with centrists has apparently been welcomed by voters, who punished his shift further to the right to rival the far-right National Front (FN) of Marine Le Pen during the 2012 presidential campaign.

The FN, which took a quarter of the vote in the first round last week, was not expected to win any councils on Sunday, in part because mainstream voters combine to keep it out of power in second-round run-offs, AFP said.

However, it won dozens of individual seats across the country, leading Le Pen to hail a "magnificent success" that showed it was "a powerful force" in many local areas.

"These elections are a crucial step for the patriot movement on its road to power," Le Pen said.

The FN, which topped last year's European Parliament elections in France, is aiming to make more progress in regional polls in December. Surveys see Le Pen likely to make it to the second round of the presidential election in 2017, but not win.

In total, 4,108 councillors with limited powers over roads, schools and social services were elected in the two rounds of local elections.

The complex voting system, in which a duo of councillors is elected per constituency, who then elect the presidents of 98 "departement" councils next Thursday, means it will take time to form an exact picture of how many councils each party has won.

Source: Agencies