Updated at 11:50 p.m. ET

Emmanuel Macron, a centrist politician who's never held elective office, and Marine Le Pen, the far-right firebrand who wants to take France out of the European Union, are expected to advance to next month's runoff for the presidency of the country, according to official results.

When the final numbers trickled in, Macron had nearly 24 percent of the vote, followed by Le Pen at around 22 percent. Francois Fillon, the only establishment candidate among the front-runners, appeared tied for third place with left-wing politician Jean-Luc Melenchon with around 20 percent of the vote each.

If the numbers hold up as expected, it will set up a battle in May between two politicians with not only completely different visions for France but — more significantly — utterly different views of one of the biggest issues facing many voters in the West today: globalization.

Macron is a liberal, former investment banker and an avowed internationalist who worked as economy minister in France's Socialist government. Le Pen has run a tough, anti-immigrant campaign and has vowed to take France out of the European Union. If she were successful, it would probably sink an institution that has helped bind Europe together for decades.

Last night, rival politicians, including Fillon, the nominee of the conservative Republican Party, began to rally around Macron to prevent Le Pen from taking the presidency.

"There is no other choice but to vote against the far right, I will vote for Emmanuel Macron," Fillon told supporters.

Elsewhere in Europe, liberal globalists cheered Macron's strong showing. A spokesman for Germany's Angela Merkel said she wished him "all the best," and Peter Altmaier, Merkel's chief of staff tweeted: "The result for @EmmanuelMacron shows: France AND Europe can win together! The middle is stronger than the populists believe!" European Commission President Jean-Claus Juncker congratulated him as well.

In his victory speech, Macron, 39, sounded at times as if he'd already won the election.

"I want to be the president of all the people of France," he said. "The challenge is to open a new page in our political life and to take action so that everyone is able to find his or her place in France and in Europe."

By contrast, Le Pen called her second-place finish a "historic result" and urged "all patriots" to back her party in next month's runoff.

"Now, we have an enormous responsibility to defend the French culture," she told supporters. "You will get a France that protects the people, we will not have the free circulation of terrorists."

For France, today's results mark a political earthquake. French voters appear to have sent a strong rebuke to the country's traditional political parties. For the first time since the end of World War II, an establishment right or left-wing party will not control the presidency.

After many years of high unemployment and a steady drumbeat of political scandals, voters turned their backs on the establishment and instead backed a political newcomer in Macron and a far-right candidate in Le Pen.

Olivier Duhamel, a political scientist at Sciences Po Paris, one of France's top universities, said the fact that someone with so little experience came out on top today was stunning.

"A man nobody knew, a very young man, this is incredibly American, this is absolutely not French," he said. "That proves that France in a way, this evening, is less of a monarchy and more a democracy."

For Americans, Duhamel said it would have been the equivalent of Ross Perot beating then-incumbent U.S. President George H.W. Bush and Democratic nominee Bill Clinton in the 1992 election.

Political analysts say Macron's apparent win today showed that many French people still believe in a more liberal, open, global society even as populists have won big victories in the last year with the United Kingdom's vote to leave the European Union and Donald Trump's election in the United States.

"We should not underestimate the capacity of resistance of other groups within societies, which are supporting more moderate parties," said Alain Dieckhoff, head of the Center for International Research at Sciences Po.

The runoff election will take place May 7, and the country will hold parliamentary elections about a month after that.

Polls suggest and many analysts predict that Macron enjoys a steep advantage going into a head-to-head race with Le Pen.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.