Former President Nicolas Sarkozy was spectacularly thrown out of the race for the French presidency on Sunday, with voters cutting short a political comeback that tapped into populist sentiment.

Nicolas Sarkozy, then the president of France, in Paris in 2012. Yves Herman / Reuters - file

Dealt a humiliating blow in the conservative nomination contest, four years after losing a first re-election bid to Socialist Francois Hollande, Sarkozy, 61, alluded to a possible withdrawal from political life when he conceded defeat.

"It's time for me to try a life with more private passions than public ones," he said, thanking his wife, Carla Bruni, and his children.

"I feel no bitterness, no sadness, and I wish all the best for my country," he told supporters at his campaign headquarters.

His surprise exit, which had appeared unthinkable days earlier, marked the failure of a strategy to court far-right voters with divisive rhetoric and tough measures on immigration and law and order.

In campaign speeches, Sarkozy had vowed to ban the Islamic burkini swimsuit, had ruled out special school lunches for Muslim children — saying they should fill up on a double portion of chips when pork is on the menu — and told migrants gaining citizenship that their ancestors were Gauls.

Former Prime Minister Alain Juppe, who was seen going through to the runoff with fellow former premier Francois Fillon, had called Sarkozy's campaign strategy "suicidal."

He came a distant third with about 20 percent of the vote Sunday, behind surprise front-runner Fillon's 44 percent and Juppe's 28 percent, according to partial results.

Allegations that he took covert funding from Libya, which resurfaced last week, may also have played a role in Sarkozy's defeat.

"Aren't you ashamed of yourself?" he told a journalist who asked him about the claims during a presidential TV debate.

When Sarkozy was president from 2007 to 2012, his high-energy style and abrasive manner polarized voters. His modest attempts at tax and labor reforms and limited success in creating jobs disenchanted both free-marketeers and centrist voters whom he had assiduously courted to win power.