France has handed the presidency to leftist Francois Hollande, a champion of government stimulus programmes who says the state should protect the downtrodden - a victory that could deal a death blow to the drive for austerity that has been the hallmark of Europe in recent years.
Mild and affable, the president-elect inherits a country deep in debt and divided over how to integrate immigrants while preserving its national identity. Markets will closely watch his initial moves as president.
He narrowly defeated the hard-driving, attention-getting Nicolas Sarkozy, an America-friendly leader who led the country through its worst economic troubles since the Second World War but whose policies and personality proved too bitter for many voters to swallow.
"Austerity can no longer be inevitable!" Mr Hollande declared in his victory speech after a surprising campaign that saw him transform from an unremarkable figure to an increasingly statesmanlike one. He will take office no later than May 16.
Speaking to exuberant crowds, Mr Hollande portrayed himself as a vehicle for change across Europe.
"In all the capitals ... there are people who, thanks to us, are hoping, are looking to us, and want to finish with austerity," he told supporters at Paris's Place de la Bastille. "You are a movement lifting up everywhere in Europe, and perhaps the world."
Celebrations continued into the night on the plaza of the French Revolution, with revellers waving French, European and labour union flags and climbing the base of its central column. Leftists were overjoyed to have one of their own in power for the first time since Socialist Francois Mitterrand was president from 1981 to 1995.
Mr Sarkozy is the latest victim of a wave of voter anger over spending cuts in Europe that has ousted governments and leaders in the past couple of years. "Too many divisions, too many wounds, too many breakdowns and divides have separated our fellow citizens. This is over now," Mr Hollande said in his victory speech, alluding to the divisive Sarkozy presidency.
Mr Hollande has said his first act after the election will be to write a letter to other European leaders calling for a renegotiation of a budget-trimming treaty aimed at bringing the continent's economies closer together. Mr Hollande wants to allow for government-funded stimulus programmes in hopes of restarting growth, arguing that debts will only get worse if Europe's economies do not start growing again.
Final results show Mr Hollande narrowly defeated Mr Sarkozy with 51.62% of the vote. Interior ministry figures show Mr Sarkozy garnered 48.38% of the vote, giving Mr Hollande a winning margin of 1.13 million votes. Voter turnout was 80.34 %, about the same as in the first round of voting on April 22.