Hollande, 57, had been the front-runner in the opinion polls from the beginning of the campaign and scored higher than Sarkozy in the first-round vote two weeks ago. It was the first time an incumbent president had lost the first ballot, in which a total of 10 candidates stood.

Hollande’s victory could also raise further questions about Europe’s economic future, including France’s commitment to reining in its spending while the rest of the 17 countries that use the euro embark on a strict period of belt-tightening. It also throws into doubt the German-French partnership that has led the eurozone's response to its financial problems and was built on the personal relationship between Sarkozy and German Chancellor Angela Merkel.

Partial official results, with about half of the nationwide votes counted, showed Hollande with 50.8% compared with 49.2% for for Sarkozy, the Associated Press said.

Sarkozy conceded defeat shortly after the polls closed, wishing Hollande "good luck" as the nation's new leader. The results made Sarzoky the first French president in more than three decades to lose a reelection bid.

PARIS -- Socialist François Hollande was elected president of France on Sunday, defeating conservative incumbent Nicolas Sarkozy in a race that focused heavily on the country's economic woes.

In the run-up to Sunday's final vote, however, the gap between the two men closed from 10 percentage points to just 4, suggesting a last-minute surge of support for Sarkozy, who surveys showed was the most unpopular president ever to run for reelection.

To the very end, Sarkozy, 56, was convinced that despite the devastating opinion polls showing him trailing badly he would snatch victory from the jaws of his predicted defeat.

Before campaigning ended at midnight Friday, as required by electoral rules, one of Sarkozy's inner circle, who asked not to be named, told Reuters: "He's like a runner. He won't consider it's over until the very end, but I'd say he has 1 chance in 6."

Warned that it would take a "miracle" to turn things around, he pinned his hopes on a higher-than-average turnout hoping it would play in his favor. In fact, the level of participation was high but still failed to secure him a second five-year term in office.

In what was an often ill-tempered campaign, Sarkozy was forced to veer even further to the right after the far-right candidate Marine Le Pen, president of the Front National, picked up nearly 18% of votes -- about 6.4 million ballots -- in the first-round vote. Sarkozy needed to pick up most of this support to win.

Just days before the runoff, however, Le Pen told supporters she would be casting a "blank vote" as the two candidates were "Siamese twins," neither of whom she could support, and advised her followers to "vote with your conscience."

The killer blow to Sarkozy's hopes came last week, when centrist candidate François Bayrou told his voters that he would support Hollande, a decision that Sarkozy's ruling right-of-center party described as a "betrayal." Bayrou said he was dismayed by Sarkozy's wooing of the far-right.

Earlier on Sunday, Hollande had voted in his rural constituency at Tulle in the Corrèze in central France. He traveled to Paris in the evening and was expected to address a victory rally at the Place de la Bastille, where the French Revolution started.

France's only other Socialist president, François Mitterrand, who was Hollande's mentor, held a similar rally there when elected in 1981. Mitterrand was reelected in 1988.

Hollande has waited 42 years to fulfill an ambition he first expressed as a teenager. Asked by the father of one of his school friends what he wanted to be when he grew up, the 15-year-old Hollande replied: "I shall be president of the republic."

ALSO:

Israel's Netanyahu calls early elections for September

Austerity-weary Greeks go to the polls in crucial election

Lahore police: Ahmadi house of worship too closely resembles a mosque

-- Kim Willsher

Photo: Supporters of Socialist Party candidate François Hollande celebrate with champagne on Sunday outside of the party's headquarters in Paris. Credit: Kenzo Tribouillard / Agence France-Presse/Getty Images