Updated

Emmanuel Macron, the centrist and political newcomer, defeated far-right candidate Marine Le Pen Sunday to win the French presidential election.

With all votes counted, the passionately pro-European Union Macron had garnered 66 percent of the vote to just 34 percent for Le Pen, who had promised a “Frexit” referendum should she win the election.

At a victory party outside the Louvre Museum in Paris, Macron supporters roared with delight at the news, waving red, white and blue tricolor flags. The jubilant crowd swelled to thousands as the night wore on.

"A new page in our long history is opening tonight. I want it to be one of hope and renewed confidence," Macron said. The 39-year-old investment banker became the youngest president in the 59-year-history of the French Fifth Republic with his victory.

The result amounted to an emphatic rejection of Le Pen's "French-first nationalism." The 48-year-old had hoped the same populist wave that led Donald Trump to the White House would also carry her to the Elysee Palace.

Macron, in a solemn televised victory speech, vowed to heal the social divisions exposed by France's acrimonious election campaign and bring "hope and renewed confidence" to his country.

"I know the divisions in our nation that led some to extreme votes. I respect them," he declared, unsmiling. "I know the anger, the anxiety, the doubts that a large number of you also expressed. It is my responsibility to hear them."

Macron's victory marked the third time in six months -- following elections in Austria and the Netherlands -- that European voters shot down far-right populists who wanted to restore borders across Europe. The election of a French president who championed European unity could also strengthen the EU's hand in its complex divorce proceedings with Britain.

After his initial televised speech, Macron took a motorcade to join the party at the Louvre, passing Parisians who had lined the streets outside his campaign headquarters. The European anthem "Ode to Joy" played as Macron strode out to address his supporters.

"France has won!" he said. "Everyone said it was impossible. But they did not know France!"

Saying Le Pen voters backed her because they were angry, he vowed: "I will do everything in the five years to come so there is no more reason to vote for the extremes."

Many French voters had backed Macron reluctantly and with the sole goal of keeping out Le Pen and her National Front party, which has a long anti-Semitic and racist history.

After the most closely watched and unpredictable French presidential campaign in recent memory, many voters rejected the runoff choices altogether. Pollsters projected that French voters cast blank or spoiled ballots in record numbers Sunday.

Congratulatory messages poured in from abroad. Trump tweeted congratulations on what he called Macron's "big win" and said he looked forward to working with the French leader. Macron has said he wants continued intelligence-sharing with the United States and cooperation at the United Nations and hopes to persuade Trump not to pull the U.S. out of a global accord fighting climate change.

Germany's foreign minister, Sigmar Gabriel, laced his welcome for Macron with a warning to the French, saying: "If he fails, in five years Mrs. Le Pen will be president and the European project will go to the dogs."

Until now, modern France had been governed either by the Socialists or the conservatives. Both Macron and Le Pen upended that right-left tradition.

"France has sent an incredible message to itself, to Europe and the world," said Macron ally Francois Bayrou, tipped among his possible choices for prime minister.

Unknown to voters before his turbulent 2014-16 tenure as France's pro-business economy minister, Macron took a giant gamble by quitting Socialist President Francois Hollande's government to run as an independent in his first campaign.

His startup political movement -- optimistically named "En Marche! (Forward)" -- caught fire in just one year, harnessing voters' hunger for new faces and new ideas.

"I'm so happy, it feels so good! I lived the election of Donald Trump in New York, and now finally, after Brexit, after Trump, populism has been beaten in France," said Pierre-Yves Colinet, a joyous Macron supporter at the Louvre victory party. "Today, I'm proud to be French."

Despite her loss, Le Pen's advancement to the runoff for the first time marked a personal and political breakthrough and underscored a growing acceptance of her fierce anti-immigration, platform. She had placed third in the 2012 presidential vote.

Le Pen immediately turned her focus to France's upcoming legislative election in June, where Macron will need a working majority to govern effectively. Le Pen said her "historic and massive" score turned her party into "the leading opposition force against the new president's plans."

"I call on all patriots to join us," Le Pen said. "France will need you more than ever in the months ahead."

Her supporters at a National Front election night gathering in Paris put on a brave face.

"Now we enter combat," said Didier Roxel, a National Front legislative candidate.

Le Pen said she got 11 million votes. If confirmed, that would be double the score of her father, National Front co-founder Jean-Marie Le Pen, at the same stage in the 2002 presidential election.

Macron and Le Pen's polar-opposite visions presented France's 47 million registered voters with the starkest possible choice. Le Pen's closed borders faced off 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 capitalizing 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.

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 decided not to run again.

Macron takes 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 U.N. Security Council.

But the vote also showed that France's 67 million people are deeply divided, riven by anxieties about terrorism and chronic unemployment, worried about the cultural and economic impact of immigration and fearful of France's ability to compete against giants like China and Google.

Macron has promised a France that would stand up to Russian President Vladimir Putin but that also would seek to work with Putin on 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 safeguarded Sunday's vote.

Read more from SkyNews.

The Associated Press contributed to this report.