french election
Election officials empty a ballot box to count votes from the first-round local elections at Nice city hall March 22, 2015. Reuters/Eric Gaillard

PARIS (Reuters) - Former President Nicolas Sarkozy's conservative UMP party and their allies are leading in the first round of French local elections, exit polls showed on Sunday, denying Marine Le Pen's far-right National Front (FN) first place.

If confirmed, the result would be an unaccustomed setback for Le Pen, who hoped her resurgent anti-immigrant, anti-euro party would emerge top in the first round, boosting her goal of being a serious contender in the 2017 presidential election.

The UMP and allies together secured around 30 percent of the national vote, exit polls showed, ahead of the anti-immigrant, anti-euro FN on 26 percent.

As expected, President Francois Hollande's ruling Socialists came third with around 20 percent of the vote, underlining their unpopularity after failed promises to bring unemployment down from current levels around 10 percent.

Sarkozy immediately ruled out any alliances between his party and FN candidates in next Sunday's second round, which will decide who controls France's "departments", one level in France's complex multi-layered system of local government.

"To those who voted National Front, we understand your frustrations," UMP chairman Sarkozy told supporters at party headquarters.

"But this party will not solve France's problems - it will only make them worse," added the ex-president, who came out of retirement last year and hopes to secure the 2017 presidential ticket for his bitterly divided party in primaries next year.

Le Pen, who advocates a return of the franc and has hailed the rise to power of hard-leftists in Greece, is one of several radical leaders making gains across Europe in the wake of the 2008-09 economic crises.

She rode a wave of disenchantment with established parties to emerge top in last year's European Parliament elections and also won control of a dozen city halls in a separate ballot.

While Sunday's vote means she can no longer argue the FN is France's most popular party, Le Pen said the result was still a gain for a party almost totally absent from the departments at present, and a slap for Hollande's Prime Minister Manuel Valls.

"Manuel Valls must now hear the message of voters and have the decency to hand in his resignation to the president," she told supporters of the centrist reformer, who Hollande already said will remain in post whatever the final vote outcome.

Valls, who toured the country seeking to drum up support for the his party, called on voters to back whatever candidate is best placed to beat the FN candidate in next Sunday's run-offs.

The two-round nature of the elections means the FN may only win as little as one out of a total 102 departments outright. But it still hopes to get dozens of its officials elected onto their councils, thus strengthening the party's local networks.

If the UMP goes on to secure the majority of the local councils across France, that will be a much-needed boost to Sarkozy's political come-back bid, which so far has failed to fully convince right-leaning voters.

He is due to re-launch the UMP with a new name in May and has signaled he will seek to win back voters from the FN with policies including a requirement for immigrants to demonstrate they have fully embraced the French language and culture.