Centrist candidate Emmanuel Macron has decisively won the French presidential election, projected results say.
Mr Macron defeated far-right candidate Marine Le Pen by about 65.5% to 34.5% to become, at 39, the country’s youngest president, the results show.
Mr Macron will also become the first president from outside the two traditional main parties since the modern republic’s foundation in 1958.
He said that a “new chapter of hope and confidence is opening”.
Mr Macron’s supporters gathered to celebrate in central Paris after the bitterly fought election concluded on Sunday amid massive security.
Live updates: France elects Macron
The Macron team said that the new president had had a “cordial” telephone conversation with Ms Le Pen.
In a speech she thanked the 11 million people who had voted for her. She said the election had shown a division between “patriots and globalists” and called for the emergence of a new political force.
Ms Le Pen said her National Front party needed to renew itself and that she would start the “deep transformation of our movement”, vowing to lead it into upcoming parliamentary elections.
She also said she had wished Mr Macron success in tackling the “huge challenges” facing him.
President François Hollande congratulated Mr Macron and said the result showed the French people wanted to unite around the “values of the republic”.
The BBC’s Hugh Schofield in Paris says this is the most remarkable success story of how a man who three years ago was utterly unknown to the French public, through sheer self-belief, energy – and connections – forged a political movement that has trounced all the established French political parties.
Subdued and blue: BBC’s James Reynolds at Le Pen HQ
There were scattered boos as the projections were announced. A few moments of quiet, uncertain chatter followed. Then supporters gave a subdued rendition of the French national anthem. Many were carrying blue-coloured roses – Marine Le Pen’s chosen symbol.
The defeat will not have come as a surprise – the fact that such a small venue was booked is an indication that the campaign suspected it would lose.
There were cheers for Marine Le Pen as she delivered her speech. During an interview afterwards, one senior party official explained to me that a new movement would now be formed – he didn’t give a name for it. Once I finished the interview, he raised his glass of champagne and said “Vive la France”.
Five reasons why Macron won
France’s ambitious man ‘on the move’
Macron’s irresistible charm
Who will Macron pick for PM?
What does Mr Macron stand for?
He is a liberal centrist, pro-business and a strong supporter of the European Union.
He left the Socialist government of President François Hollande last August to form his new movement – En Marche – saying it was neither left nor right wing.
His campaign pledges included a 120,000 reduction in public-sector jobs, a cut in public spending by €60bn (£50bn; $65bn), and a lowering of the unemployment rate to below 7%.
He vowed to ease labour laws and give new protections to the self-employed.
Mr Macron also stood on a pro-EU platform, in stark contrast to his opponent.
Will his charm work? BBC’s Hugh Schofield in Paris
Often with Emmanuel Macron one fears that (in a way that is very French) it is words that are doing his work. Words that are bridging the divides; words that are flattering his opponents; words that create the devotion that, among some, he inspires.
In the campaign it became a joke among journalists how often his answers included the words “au meme temps” (at the same time). It was his way of marrying everything and its opposite, of reconciling every contradiction.
He got away with it because he is who he is.
But in the real life of running a fractious, angry, divided country – will his words have the same effect? Will his solitary self-belief create the structures of political support which he needs in the rough-and-tumble of government? Will his charm still work?
Read more from Hugh
What will be his immediate difficulties?
Well, his En Marche grouping has no seats in parliament at all.
Legislative elections follow on quickly from the presidential poll – on 11 and 18 June.
En Marche will contest the elections as a party but Mr Macron may find himself needing to pull together a coalition to govern effectively.
Although his presidential candidacy had support from other political parties, much of it stemmed from the need to defeat Ms Le Pen.
He will need to win over the abstainers and those who are sceptical about his political vision. Left-wing voters in particular felt disenfranchised by the choice of the final two candidates.
Mr Macron will also need to tackle the fallout from a hacking attack on Friday, the final day of campaigning, when a trove of documents relating to his campaign, said to include both genuine and fake documents, was released online.