PARIS — France’s political mainstream, shut out of the presidency by an angry electorate, united on Monday to call on voters to back centrist Emmanuel Macron and reject Marine Le Pen’s populist nationalism.

Politicians on the moderate left and right, including the Socialist and Republicans party losers in Sunday’s first-round vote, maneuvered to block Le Pen’s path to power in the May 7 runoff.

Voters narrowed the presidential field from 11 to two. France’s presidential election is widely seen as a litmus test for the populist wave that last year prompted Britain to vote to leave the European Union and U.S. voters to elect Donald Trump president.

The defeated far-left candidate, Jean-Luc Melenchon, pointedly refused to back Macron, and Le Pen’s National Front is hoping to do the once-unthinkable and peel away voters historically opposed to a party long tainted by racism and anti-Semitism.

“The voters who voted for Mr. Melenchon are angry voters. They can be in agreement with us,” National Front Vice President Steeve Brios told the Associated Press. He said that they express a choice “outside the system.”

Choosing from inside the system is no longer an option. Voters rejected the two mainstream parties that have alternated power for decades, in favor of Le Pen and the untested Macron, who has never held elected office and who founded his own political movement just last year.

Turnout was 78 percent, down slightly from 79 percent in the first round of presidential voting in 2012.

Socialist candidate Benoit Hamon, whose party holds a majority in the legislature, got just 6 percent. Socialist President Francois Hollande is the most unpopular in modern French record-keeping. He didn’t seek re-election.

“We are in a phase of decomposition, demolition, deconstruction,” former Socialist prime minister Manuel Valls said. “We didn’t do the work — intellectual, ideological and political — on what the left is, and we paid the price.”

Francois Fillon, the scandal-plagued conservative Republicans candidate, fared marginally better, coming in third with just shy of 20 percent of the vote.

Both center-right and center-left fell in behind Macron, whose optimistic vision of a tolerant France and a united Europe with open borders is a stark contrast to Le Pen’s darker, inward-looking “French first” platform that calls for closed borders, tougher security, less immigration and dropping the shared euro currency to return to the French franc.

Le Pen went on the offensive against Macron in her first public comments Monday.

“He is a hysterical, radical ‘Europeanist.’ He is for total open borders. He says there is no such thing as French culture. There is not one domain that he shows one ounce of patriotism,” she said.

European stock markets surged, and France’s main index hit its highest level since early 2008, as investors gambled that the rise of populism around the world — and the associated potential unpredictability in policymaking — may have peaked.

German Chancellor Angela Merkel wished Macron “all the best for the next two weeks.”

Merkel’s chief of staff, Peter Altmaier, tweeted that “the result for Emmanuel Macron shows: France AND Europe can win together! The center is stronger than the populists think!”

Le Pen’s father, Jean-Marie, made it to the second round against Jacques Chirac in 2002 and was crushed in the runoff. Many commentators expect the same fate for his daughter, but she has already drawn far more support than he ever did and she has transformed the party’s once-pariah image.

Chirac refused to debate Jean-Marie Le Pen on principle. Macron has already agreed to share a stage with his daughter.

Le Pen offers an alternative for anyone skeptical of the EU and France’s role in it, said Louis Aliot, another National Front vice president.

“I’m not convinced that the French are willing to sign a blank check to Mr. Macron,” he said.

But Macron’s party spokesman, Benjamin Griveaux, said that Le Pen is hardly a vector of change.

“She’s been in the political system for 30 years. She inherited her father’s party and we will undoubtedly have Le Pens running for the next 20 years, because after we had the father, we have the daughter and we will doubtless have the niece,” he said, referring to Marion Marechal-Le Pen. “So she is in a truly bad position to be talking about the elites and the people.”

Macron came in first in Sunday’s vote, with just over 23 percent; Marine Le Pen had 21 percent; Melenchon and Fillon each had 19 percent. Fillon, a former prime minister, bested the former Trotskyist Melenchon by just 94,998 votes.

Protesters burned cars, danced around bonfires and dodged riot police overnight at the Place de la Bastille and Republique. Twenty-nine people were detained at the Bastille, where protesters waved red flags and sang “No Marine and no Macron!” in anger at the results.