Emmanuel Macron was elected president of France on Sunday 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 U.S. president.
Pollsters' projections gave Macron a winning margin of around 65 percent to 35 - 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 in French politics, and underlined the scale of the divisions that Macron must now try to heal.
"I know the divisions in our nation, which have led some to vote for the extremes. I respect them," Macron said in an earnest 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."
His immediate challenge will be to secure a majority in next month's parliamentary election for En Marche! (Onwards!), a political movement that is barely a year old, in order to implement his programme.
President Francois Hollande, who first brought Macron into national 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, the 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 told German Chancellor Angela Merkel in a telephone call on Sunday after the result that he would travel to Berlin soon for talks.
Trump also tweeted his congratulations on Macron's "big win", saying he looked forward to working with him.
Macron's team successfully managed to skirt 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 U.S. election campaign.
Allegations by Macron's camp that it had been targeted in a massive computer hack that compromised emails added last-minute drama on Friday night, just as official campaigning was ending.
YOUNGEST SINCE NAPOLEON
The 39-year-old former investment banker, who served for two years as economy minister under Hollande but has never previously held elected office, will become France's youngest leader since Napoleon.
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 of around 35 percent 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 last century.
"I've liked his youth and his vision from the start," said Katia Dieudonné, a 35-year-old immigrant from Haiti who had brought her two children to Macron's victory rally outside the Louvre Palace in central Paris.
"He stands for the change I've wanted since I arrived in France in 1985 - openness, diversity, without stigmatising anyone ... I've voted for the left in the past and been disappointed."
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.
When he moves into the Elysee Palace after his inauguration next weekend, Macron will become the eighth - and youngest - president of France's Fifth Republic.
Opinion surveys taken before the second round suggest that his fledgling En Marche! (Onwards!) movement, despite being barely a year old, has a fighting chance of securing the majority he needs.
He plans to blend a big reduction in public spending and a relaxation of labour laws with greater investment in training.
A European integrationist and pro-NATO, he is orthodox in foreign and defence policy and shows no sign of wishing to change France's traditional alliances or reshape its military and peacekeeping roles in the Middle East and Africa.
His election also represents a long-awaited generational change in French politics that have been dominated by the same faces for years.
He will be the youngest leader in the current Group of Seven (G7) major nations and has elicited comparisons with youthful leaders past and present, from Canadian Prime Minister Justin Trudeau to British ex-premier Tony Blair and even late U.S. president John F. Kennedy.
But any idea of a brave new political dawn will be tempered by a projected abstention rate on Sunday of around 25 percent, the highest this century, and by estimates that around 9 percent of those who did vote cast blank or spoiled ballots.
Many of those will have been supporters of the far-left maverick Jean-Luc Melenchon, whose high-spending, anti-EU, anti-globalisation platform had many similarities with Le Pen's.
Melenchon took 19 percent in coming fourth in the first round of the election two weeks ago, and pointedly refused to endorse Macron for the runoff.
France's biggest labour union, the CFDT, welcomed Macron's victory but said that the National Front's score was still worryingly high.
"Now, all the anxieties expressed at the ballot by a part of the electorate must be heard," it said in a statement. "The feeling of being disenfranchised, of injustice, and even abandonment is present among a large number of our citizens."
Like Macron, Le Pen will now have to work to try to convert her presidential result into parliamentary seats, in a two-round system that has in the past encouraged voters to vote tactically to keep her out.
She has worked for years to soften the xenophobic associations that clung to the National Front under her father, going so far as to expel him from the party he founded.
On Sunday night, her deputy Florian Philippot distanced the movement even further from him by saying the new, reconstituted party would not be called "National Front".