Emmanuel Macron has been elected French president with a business-friendly vision of European integration, defeating Marine Le Pen, a far-right nationalist who threatened to take France out of the European Union.
The centrist's emphatic victory, which also smashed the dominance of France's mainstream parties, will bring huge relief to European allies who had feared another populist upheaval to follow Britain's vote to quit the EU and Donald Trump's election as US president.
The euro currency, hit a six-month high against the dollar while Asian shares gained and US stocks briefly touched a record high.
With virtually all votes counted, Macron had topped 66 per cent against just under 34 per cent for Le Pen - a gap wider than the 20 or so percentage points that pre-election surveys had suggested.
Even so, it was a record performance for the National Front, a party whose anti-immigrant policies once made it a pariah, and underlined the scale of the divisions that Macron must now try to heal.
After winning the first round two weeks ago, Macron had been accused of behaving as if he was already president. On Sunday night, with victory finally sealed, he was much more solemn.
"I know the divisions in our nation, which have led some to vote for the extremes. I respect them," Macron said in an address at his campaign headquarters, shown live on television.
"I know the anger, the anxiety, the doubts that very many of you have also expressed. It's my responsibility to hear them," he said.
"I will work to recreate the link between Europe and its peoples, between Europe and citizens."
Later he strode alone almost grimly through the courtyard of the Louvre Palace in central Paris to the strains of the EU anthem, Beethoven's Ode to Joy, not breaking into a smile until he mounted the stage of his victory rally to the cheers of his partying supporters.
His immediate challenge will be to secure a majority in next month's parliamentary election for a political movement that is barely a year old, rebranded as La Republique En Marche ("Onward the Republic"), in order to implement his program.
Outgoing president Francois Hollande, who brought Macron into politics, said the result "confirms that a very large majority of our fellow citizens wanted to unite around the values of the Republic and show their attachment to the European Union".
Jean-Claude Juncker, president of the European Commission, told Macron: "I am delighted that the ideas you defended of a strong and progressive Europe, which protects all its citizens, will be those that you will carry into your presidency."
Macron spoke by phone with German Chancellor Angela Merkel, with whom he hopes to revitalise the Franco-German axis at the heart of the EU, saying he planned to visit Berlin shortly.
Trump tweeted his congratulations on Macron's "big win", saying he looked forward to working with him. Chinese President Xi Jinping said China was willing to help push Sino-French ties to a higher level, according to state news agency Xinhua.
Macron will become France's youngest leader since Napoleon. A 39-year-old former investment banker, he served for two years as economy minister under Hollande but has never previously held elected office.
Le Pen, 48, said she had also offered her congratulations. But she defiantly claimed the mantle of France's main opposition in calling on "all patriots to join us" in constituting a "new political force".
Her tally was almost double the score that her father Jean-Marie, the last far-right candidate to make the presidential runoff, achieved in 2002, when he was trounced by the conservative Jacques Chirac.
Her high-spending, anti-globalisation "France-first" policies may have unnerved financial markets but they appealed to many poorer members of society against a background of high unemployment, social tensions and security concerns.
Despite having served briefly in Hollande's deeply unpopular Socialist government, Macron managed to portray himself as the man to revive France's fortunes by recasting a political landscape moulded by the left-right divisions of the past century.
Macron was due to attend a ceremony marking the Western allies' World War Two victory in Europe on Monday. The ceremony in Paris marks the 72nd anniversary of the victory over Nazi Germany in 1945.
Macron's team successfully skirted several attempts to derail his campaign - by hacking its communications and distributing purportedly leaked documents - that were reminiscent of the hacking of Democratic Party communications during Hillary Clinton's US election campaign.
Allegations by Macron's camp that a massive computer hack had compromised emails added last-minute drama on Friday night, just as official campaigning was ending.
While Macron sees France's way forward in boosting the competitiveness of an open economy, Le Pen wanted to shield French workers by closing borders, quitting the EU's common currency, the euro, radically loosening the bloc and scrapping trade deals.
Macron will become the eighth - and youngest - president of France's Fifth Republic when he moves into the Elysee Palace after his inauguration next weekend.