PARIS - French voters on Sunday elected pro-European centrist Emmanuel Macron as president by an overwhelming margin.
The 39-year-old investment banker headed off a fierce challenge from the far right in a pivotal vote for the future of the divided country and Europe.
Macron is France's youngest leader ever elected.
Initial vote-counts showed Macron winning between 65.5% and 66.1% of ballots, with Le Pen trailing badly on between 33.9% and 34.5%.
In his victory speech, Macron was ecstatic. "A new page of our long history is turned ... one of refound hope and trust," he said.
Le Pen officially conceded within 20 minutes after the first results were released at 8pm (1am Thailand time), and called Macron to congratulate him.
The victory by political newcomer Macron, an unabashedly pro-European former investment banker, strengthens and strengthening France's place as a central pillar of the European Union.
Many French voters backed Macron reluctantly, not because they agreed with his politics but simply to keep out Le Pen and her far-right National Front party, still tainted by its anti-Semitic and racist history.
After the most closely watched and unpredictable French presidential campaign in recent memory, many voters rejected the choice altogether: Pollsters projected that voters cast blank or spoiled ballots in record numbers Sunday - a protest of both candidates.
A crowd outside the Louvre museum at a Macron victory party jubilantly waved red, white and blue tricolour flags at the news.
The result constitutes a resounding rejection of far-right Le Pen's "French-first" nationalism and dashes her hopes that the same populist wave that swept Donald Trump into the White House would also carry her to the French presidential Elysee Palace.
It is the third time in six months - following elections in Austria and the Netherlands - that European voters have shot down far-right populists who want to restore borders across Europe. The victory of Macron, who championed European unity, could strengthen the EU's hand in its complex divorce proceedings with Britain, which voted last year to leave the bloc.
Unknown to voters before his turbulent 2014-16 tenure as a pro-business economy minister, Macron took a giant gamble by quitting the government of outgoing Socialist President Francois Hollande to run his first-ever electoral campaign as an independent.
His startup political movement - optimistically named, En Marche! (Forward!) - caught fire in just one year, harnessing voters' hunger for new faces and new ideas and steering France into uncharted political territory.
In a first for post-war France, neither of the mainstream parties on the left or the right qualified in the first round of voting on April 23 for Sunday's winner-takes-all duel between Macron and Le Pen.
Despite her projected loss, Le Pen's advancement to the run-off for the first time marked a breakthrough for the 48-year-old. She placed third in 2012, underscoring a growing acceptance for her fierce anti-immigration, France-first nationalism among disgruntled voters.
The candidates' polar-opposite visions presented the 47 million registered voters with the starkest possible choice: Le Pen's closed borders against Macron's open ones; his commitment to free trade ran against her proposals to protect the French from global economic competition and immigration.
Her desire to free France from the EU and the shared euro currency contrasted with his argument that both are essential for the future of Europe's third-largest economy.
As well as capitalising on voter rejection of the left-right monopoly on power, Macron also got lucky.
One of his most dangerous opponents, conservative former Prime Minister Francois Fillon, was hobbled by allegations that his family benefited from cushy taxpayer-funded jobs for years.
And on the left, the Socialist Party imploded, its candidate abandoned by voters who wanted to punish Hollande, France's most unpopular president since World War II. Hollande himself realised he was unelectable and decided not to run again.
In power, Macron would take charge of a nation that, when Britain leaves the EU in 2019, will become the EU's only member with nuclear weapons and a permanent seat on the UN Security Council.
He has promised a France that would stand up to Russian President Vladimir Putin but that also would seek to work with the Russian leader on what he says will be one of his top priorities: fighting the Islamic State group, whose extremists have claimed or inspired multiple attacks in France since 2015.
France has been in a state of emergency since then and 50,000 security forces were used to safeguard Sunday's vote.
Macron is expected to keep up French military operations against extremists in Iraq and Syria and Africa's Sahel region, and maintain pressure on Russia over Ukraine and support for Syrian President Bashar Assad.
With the United States, Macron says he wants continued intelligence-sharing and cooperation at the UN, and hopes to persuade Trump not to pull the US out of a global emissions-cutting deal against climate change.
Domestically, Macron inherits a deeply troubled and divided nation of 67 million people. The French are riven by anxieties about terrorism and chronic unemployment, worried about the cultural, economic and religious impact of immigration and fear France's ability to compete against giants like China and Google.
His proposed remedies include both economic reforms and his own infectious, upbeat optimism that France need not resign itself to continuing economic and social decline, especially as part of an EU competing together against other powers.
The campaign ended Friday night with a hacking attack and document leak targeting Macron. France's government cybersecurity agency, ANSSI, is investigating. Macron's team said the hack aimed to destabilise the vote. But the timing of the leak appeared too late to have a significant impact on voting intentions.