PARIS — The European political establishment breathed a heavy sigh of relief Sunday, as French voters easily elected pragmatic centrist Emmanuel Macron as president over right-wing challenger Marine Le Pen, who threatened to upend Europe’s existing order.

Macron won with about 65% of votes against 34% for Le Pen, according to projections from France's polling agencies. Le Pen called Macron to congratulate him on his victory, as did current French President François Hollande and other European leaders.

President Trump tweeted congratulations to Macron "on his big win today."

Macron, in a short victory speech, promised a "new chapter of hope and confidence" and said he would work for all of France.

Le Pen threatened to curb immigration, particularly for Muslims, pull France out of the European Union and return the country to the French franc — moves that would have caused political and economic upheaval in Europe and around the world.

Macron, 39, is a former investment banker and economy minister who strongly supports the European Union. He is France's youngest ever president.

Profile: France's new President Emmanuel Macron

Macron’s victory, coming on the heels of defeats for right-wing populist candidates in Austria and the Netherlands, appears to blunt the anti-establishment fervor sweeping Europe amid a backlash against economic stagnation, a flood of migrants pouring into their countries and a string of nerve-rattling terror attacks.

His supporters gathered outside the Louvre waved red, white and blue tricolor flags and sang "we have won, we have won."

"It's the first time I have ever been involved in politics," said Laurence Falque, 57, a doctor from Paris who said he worked to get out the vote on the candidate's behalf. "He brings people together. He is young, he is smart, pragmatic."

Macron supporters at the Place de la République in Paris waved banners and cars honked.

"This is a very important election for the French people especially because it comes after a series of elections with unhappy endings such as the election of President Trump in the United States and Brexit," said Oumaima Bribri, 25, a student in Paris.

But Macron's triumph does not necessarily signal the end of populism on the continent.

"We are in a dynamic where countries are pulling inward, into their national identities,” said Bruno Cautres, a political analyst at the Center for Political Research at Sciences Po, a university in Paris. "The climate in France is rather a climate that promotes Le Pen's discourse."

Nigel Farage, the former leader of the U.K. Independence Party that successfully campaigned for Britain to leave the EU, tweeted that "@EmmanuelMacron offers 5 more years of failure, power to the EU and open borders. If (Marine Le Pen) sticks in there, she can win in 2022 (the next scheduled election)."

President Trump offered his congratulations to Macron "on his big win today."

The final day of the campaign on Friday was marked by a hacking attack and document leak targeting Macron. En Marche!, Macron's party, said real documents were mixed with fake ones. The perpetrators remain unknown.

Macron and Le Pen defeated nine other presidential candidates in the first round of voting on April 23. Hollande opted not to run for re-election because of his low popularity ratings. Unemployment stands at 9.6%, and Hollande has struggled to prevent terrorism or curb government corruption.

Anand Menon, a professor of international relations at King's College London, said Le Pen and Macron have one important similarity.

"Neither candidate comes from an established political party that's been successful in the National Assembly," he said, referring to France's powerful Parliament, which holds elections in June. "It raises issues around how the political system will function with a president who doesn't control the National Assembly."

French security was on high alert. A few days before last month's vote, a man inspired by the Islamic State shot and killed a police officer on the Champs-Élysées. Earlier in the day, a security alert forced an evacuation of Macron's campaign staff as they prepared for the victory party outside the Louvre.

"It's the continuity of what it was under Hollande," said Bernard Cironneau, 66, retired military officer from Paris who was disappointed that Le Pen did not win.

"It's not good and terrorism will increase," he said.