French President Nicolas Sarkozy faces an uphill struggle in the second round of the presidential election, after coming second in Sunday's first vote.
He won only 27.1% of the vote, while his socialist rival Francois Hollande took 28.6%, the first time a sitting president has lost in first round.
The two men will face each other in a second round of voting on 6 May.
Third-place Marine Le Pen took the largest share of the vote her far-right National Front has ever won with 18.1%.
The BBC's Christian Fraser in Paris says his narrow victory in this round gives Francois Hollande crucial momentum ahead of the run-off in two weeks' time.
Analysts suggest Mr Sarkozy will now need to appeal to the far-right voters who backed Ms Le Pen if he is to hold on to the presidency, but Mr Hollande remains the front runner.
Around one in five people voted for the National Front candidate, including many young and working class voters, putting her ahead of seven other candidates.
Whereas Francois Hollande can tack to the centre, President Sarkozy must appeal to the right”
The poll has been dominated by economic issues, with voters concerned with sluggish growth and rising unemployment.
After the results began to come in, Mr Hollande said he was "best placed to become the next president of the republic" and that Mr Sarkozy had been punished by voters.
"The choice is simple, either continue policies that have failed with a divisive incumbent candidate or raise France up again with a new, unifying president," Mr Hollande said.
It is the first time a French president running for re-election has failed to win the first round since the start of the Fifth Republic in 1958.
Mr Sarkozy - who has been in power since 2007 - said he understood "the anguish felt by the French" in a "fast-moving world".
The focus of the Socialist Party these past few weeks was to deny any momentum to President Sarkozy. The first cheer came when the result appeared on the TV screens. Any lead at this stage is considered a strong performance.
The second cheer came for Jean-Luc Melenchon who called on his supporters to join forces with those of Mr Hollande to defeat Nicolas Sarkozy.
Nothing will be taken for granted here. In 1995 Lionel Jospin lost a first-round lead. Greater efforts will be made in the next week to get out the vote.
But 350 polls published since this campaign began have put Mr Hollande in a commanding lead for round two. The celebrations must wait another two weeks - but they are daring to believe.
He called for three debates during the two weeks to the second round - centring on the economy, social issues, and international relations.
Mr Hollande promptly rejected the idea. He told reporters that the traditional single debate ahead of the second round was sufficient, and that it should "last as long as necessary".Far-right shock
Turnout on Sunday was high, at more than 80%.
Ms Le Pen, who leads the anti-immigration National Front, achieved more than the breakthrough score polled in 2002 by her father and predecessor, Jean-Marie Le Pen, who got through to the second round with more than 16%.
After the vote, Ms Le Pen told jubilant supporters that the result was "only the start" and that the party was now "the only opposition" to the left.
Leftist candidate Jean-Luc Melenchon, who was backed by the Communist Party, came fourth with almost 12%.
He urged his supporters unconditionally to rally behind Mr Hollande in the run-off.
Centrist Francois Bayrou, who was hoping to repeat his high 2007 score of 18%, garnered only about 9%.
Polls suggest Mr Hollande will comfortably win the second round.
The BBC's Chris Morris in Paris says that if Mr Sarkozy cannot change the minds of a substantial number of people, he will become the first sitting president to lose an election since 1981.
Wages, pensions, taxation, and unemployment have been topping the list of voters' concerns.
President Sarkozy has promised to reduce France's large budget deficit and to tax people who leave the country for tax reasons.
Mr Hollande has strongly criticised Mr Sarkozy's economic record.
The Socialist candidate has promised to raise taxes on big corporations and people earning more than 1m euros a year.
He also wants to raise the minimum wage, hire 60,000 more teachers and lower the retirement age from 62 to 60 for some workers.
If elected, Mr Hollande would be France's first left-wing president since Francois Mitterrand, who completed two seven-year terms between 1981 and 1995.