Facing the prospect of a French president who promised to hold a referendum on the country's exit from the European Union, leaders across the continent breathed a sigh of relief following Emmanuel Macron's victory Sunday over nationalist Marine Le Pen.

Macron, a centrist and ardent supporter of the EU, won the French presidential election by a wide margin, but support for Le Pen -- the most ever for a candidate from the populist National Front party -- represents a growing anti-European Union sentiment across the continent, one which notably led to last year's "Brexit" of Great Britain from the alliance.

France chooses centrist Macron over far-right Le Pen as next president

French voters pick new president amid heightened security

After Macron's victory was confirmed, Spanish Prime Minister Mariano Rajoy described the election as a defining moment for the EU.

"France -- a friend, neighbor and strategic partner of Spain -- will actively contribute to the advancement and reinforcement of the European Union in a key moment of its history," wrote Rajoy in a congratulatory message to Macron.

A spokesperson for German Chancellor Angela Merkel -- who was the president-elect's first phone call Sunday night -- said that "the decision of the French voters is a clear statement of support for Europe."

The German leader "praised [Macron's] stance for a united and open European Union during the campaign" and "[looks] forward to working together with the new president on the basis of trust in the spirit of the traditional German-French friendship."

Germany's Foreign Minister Sigmar Gabriel warned, however, that Macron must take action to boost the French economy to prevent Le Pen from building on her party's progress, saying Macron "must succeed, if he fails, in five years Mrs. Le Pen will be president and the European project will go to the dogs."

In a strongly worded tweet, Donald Tusk, the president of the European Council -- who has previously warned about the threat that changing political sentiments pose to the European Union -- congratulated Macron as well as the French people for choosing "Liberty, Equality and Fraternity over tyranny of fake news."

Congratulations @EmmanuelMacron. Congratulations to French people for choosing Liberty, Equality and Fraternity over tyranny of fake news. — Donald Tusk (@eucopresident) May 7, 2017

ABC News' Benjamin Gittleson and Joshua Hoyos and The Associated Press contributed to this report.