Last Updated: May 8, 11:45 a.m.

The French public delivered a crushing blow to the hopes of extreme nationalists from Congress to the Kremlin on Sunday, by electing the moderate, pro-European Emmanuel Macron president, in a landslide victory over the candidate of the far-right National Front, Marine Le Pen, who campaigned on a promise to leave the European Union.

Initial projections released as soon as the polls closed, and borne out by the final vote tallies later, put the scale of Macron’s victory at two-thirds of valid votes cast, thrilling supporters who gathered outside the Louvre in Paris.

Supporters of French independent centrist presidential candidate, Emmanuel Macron react outside the Louvre museum in Paris, France, Sunday, May 7, 2017. Polling agencies have projected that centrist Emmanuel Macron will be France's next president, putting a 39-year-old political novice at the helm of one of the world's biggest economies and slowing a global populist wave. The agencies projected that Macron defeated far-right leader Marine Le Pen 65 percent to 35 percent on Sunday. (AP Photo/Laurent Cipriani)

Supporters of Emmanuel Macron cheered outside the Louvre in Paris when his victory in the French presidential election was announced on Sunday.

Photo: Laurent Cipriani/AP

As the mayor of Paris noted on Twitter, Macron took 90 percent of the votes cast in the French capital — but he also swept all but two of France’s 102 départements.

Still, Macron will be forced to confront widespread dissatisfaction with France’s political system, reflected in depressed turnout — with over a quarter of voters abstaining — and the fact that a record number of registered voters, close to 9 percent, went to the polls but only to cast ballots that were blank or otherwise spoiled as a form of protest.

That Le Pen managed to get about a third of the valid votes for her extremist appeal to xenophobic French nationalism was variously seen as a triumph for moderation or a frightening advance, 15 years after her father had garnered less than 18 percent in the 2002 election.

Jean-Luc Mélenchon, the charismatic leader of the new, left-wing France Insoumise movement, who had refused to endorse Macron, hailed the defeat of Le Pen in a YouTube statement — in which he pointed out that she actually finished third in the election, given that more registered voters either abstained or spoiled their ballots than voted for her.

For her part, Le Pen promised to continue her attempts to bring her far-right, racist movement into the mainstream, announcing plans to change it’s name. She then hit the dance floor, where a handful of journalists who had not been expelled from the party for overly critical coverage of the candidate filmed her dancing to Joan Jett and The Village People.

Others fiercely opposed to Le Pen’s politics allowed themselves a moment to celebrate the humbling of the alt-right internationale.

Pierre Haski, a former deputy editor of Libération, the left-wing daily, even trolled Le Pen’s supporter in the White House, Donald Trump, for his tweeted congratulations to Macron.

Others, in France and abroad, shared memes mocking the humiliated international “fachosphere.”

When Macron arrived at the Louvre to celebrate with supporters, he emerged to the strains of Beethoven’s “Ode to Joy,” which is the anthem of the European Union.

That gesture to European solidarity — and a phone conversation with the German chancellor, Angela Merkel — was quickly taken as an affront by Le Pen’s extreme nationalist supporters, including her deputy, Florian Philippot, who claimed that Macron’s first act had been to replace the French national anthem with Europe’s.

In fact, after Macron made a point of hushing boos for Le Pen during his speech — telling her supporters that he would do everything he could over the next five years to ensure that they no longer had reason to vote for an extremist — his rally ended with the French anthem, “La Marseillaise,” being sung from the stage and the crowd.

Macron’s new political movement now faces an immediate challenge in the form of legislative elections next month, in which it will have to win a majority of seats despite fielding a slate of unknown candidates drawn largely from outside the political system.

To gain a majority in Parliament, Macron’s candidates will have to defeat rivals from the mainstream parties of the left and the right, as well as Le Pen’s nationalists and members of a new grassroots political movement of the far-left, France Insoumise, or France Unbowed.

After Macron’s victory was confirmed, two leaders of France Insoumise, Raquel Garrido and Alexis Corbiere, suggested that while there is an anti-fascist majority in France, the legislative elections would reveal far less support for Macron’s neoliberal economic policies.

“We don’t know if Macron will have a majority in the National Assembly,” Garrido tweeted. “It could be that Macron will be the opposition!”

“We welcome the defeat of Le Pen,” Corbiere added, “but Macron does not have a political majority for his project.”

Polling appeared to bear that prediction out, suggesting that less than 40 percent of France wants Macron to govern with a majority in Parliament.

Mélenchon, the France Insoumise leader, expressed hope that, after a presidential election marked by “rejection and fear,” the vote for Parliament would be an opportunity “to make a positive choice.”