PARIS — In France’s most consequential election in recent history, voters on Sunday chose Emmanuel Macron and Marine Le Pen to go to a runoff to determine the next president, official returns showed. One is a political novice, the other a far-right firebrand — both outsiders, but with starkly different visions for the country.
The result was a full-throated rebuke of France’s traditional mainstream parties, setting the country on an uncertain path in an election that could also decide the future of the European Union.
It is the first time in the nearly 59-year history of France’s Fifth Republic that both of the final candidates are from outside the traditional left-right party structure. Together, they drew less than half the total votes cast in a highly fractured election.
Even before the official tallies were announced, the political establishment was rallying behind Mr. Macron, warning of the dangers of a victory by Ms. Le Pen’s far-right National Front, though few analysts give her much of a chance of winning the May 7 runoff.
Mr. Macron, a former investment banker, abandoned traditional parties a year ago to form his own movement with an eclectic blend of left and right policies. He campaigned on a pro-European Union platform, coupled with calls to overhaul the rules governing the French economy.
“The French people have decided to put me at the top in the first round of the vote,” Mr. Macron told jubilant supporters at a rally in Paris. “I’m aware of the honor and the responsibility that rest on my shoulders.”
Ms. Le Pen’s success was a victory for people who oppose the European Union and for those who want to see more “France first” policies to restrict immigration, protect French industry and limit public signs of Muslim faith, including the wearing of head scarves.
“The great debate will finally take place,” Ms. Le Pen said on Twitter. “French citizens need to seize this historic opportunity.”
Political experts said the vote showed a new, profound cleavage in French politics around globalization, as well as France’s relationship with the European Union.
“Fundamentally, this shows that France is going through deep political tensions: clashes over the global economy, the integration of France into the global economy and into Europe,” said Bruno Cautrès, a political analyst and public opinion specialist at the Center for Political Research at Sciences Po, the institute of political studies in Paris.
It is not that the left-right divide no longer matters — after all, voters gave roughly 40 percent of the vote to various versions of the traditional left and right — but that it is now complicated by the crosscutting politics of globalization versus anti-globalization.
With 97 percent of the vote counted, Mr. Macron had 23.9 percent, Ms. Le Pen had 21.5 percent, the mainstream right candidate François Fillon had nearly 20 percent, and the far-left candidate Jean-Luc Mélenchon had 19.6 percent.
When Ms. Le Pen spoke to supporters in the small town of Hénin-Beaumont in northern France, although the results were not yet definitive, she sounded victorious.
She not only made it to the second round for the first time, but also got a higher percentage of votes than she did in 2012, and a higher percentage than her father, Jean-Marie Le Pen, did in 2002, when he made it to the second round as the National Front candidate and faced Jacques Chirac.
Ms. Le Pen said the outcome was “an act of French pride, that of a people who are raising up their heads, that of a people sure of their values and confident of the future.”
That future would be a perilous one under the National Front, others warned. Bernard Cazeneuve, the sitting Socialist prime minister, called Ms. Le Pen’s project “dangerous and sectarian” and said it would “impoverish, isolate and divide” the country.
“It will inevitably lead to the end of Europe and of the euro, and, eventually, to France’s relegation,” he said. “The National Front cannot be the future of our country.”
For now, voters narrowly embraced Mr. Macron’s centrist calls for change over more strident appeals from the far left and the far right for France to fortify itself against immigration and globalization.
His success also suggests that despite multiple terrorist attacks in France recently, a message of outreach to immigrants and acceptance of Muslims, as well as of ethnic diversity, has some currency. Ms. Le Pen campaigned stridently against Muslims and immigration, linking both to security threats, and she may have benefited from a final surge of support after a terrorist attack in Paris on Thursday.
In contrast, Mr. Macron, in his address to supporters as the returns were still being tabulated Sunday night, emphasized that he wanted to be the president of all of France. He promised “to bring together the French people,” clearly recognizing that if he wins the runoff, as is expected, he will have to lead a politically fractured country.
Four candidates with markedly different views came within a few points of one another in the vote on Sunday, suggesting that the fight about what vision of France will dominate the future is far from over.
Both Mr. Macron’s supporters and those of Ms. Le Pen were cheering madly at their respective candidates’ headquarters, with Ms. Le Pen’s loyalists dancing in the street outside the place where she was speaking in Hénin-Beaumont.
The two finalists could hardly be more different on the big questions facing France: globalization, immigration and French identity. Beyond that, they represent completely different faces of France.
Ms. Le Pen’s voters want a government that protects them from the vicissitudes of the marketplace and closes its borders to outsiders, re-establishing the frontiers that have been largely erased by the European Union.
Although Ms. Le Pen has younger, more high-tech voters, she also represents the France that feels left behind: the workers whose jobs have moved to cheaper countries, such as those in Eastern Europe and Asia.
She represents young people who have to go to work early in life to help support their families, and who do not have the advanced degrees that afford them a good income. And she represents people who feel threatened by the immigrants thronging to Europe.
“Marine will fight for the young people — for their future, for their freedom, for their job, for their family,” said Aurore Lahondes, a resident of the central-west city of Angers. She called Mr. Macron, a onetime investment banker at Rothschild & Company, “the candidate who is the most far away from the people.”
“He is the candidate of the financial part of the world,” Ms. Lahondes, 19, said in an interview at a bar that had been rented out by the local National Front federation. “He is the candidate of the European Union.”
Mr. Macron represents a more educated and cosmopolitan France. His voters are not all privileged by any means, but they believe that looking beyond the country’s borders will enrich them in every way, economically and culturally. Mr. Macron’s challenge will be to convince more of the French that globalism has as many rewards as it does costs.
“Globalism has positive effects, but it also increases precariousness and inequalities,” said Thomas Guénolé, a political-science professor at Sciences Po.
The vote on Sunday came after a bruising campaign in which the public repeatedly rejected candidates who were expected to be winners. In the mainstream right primary, the mayor of Bordeaux, Alain Juppé, was expected to handily best Mr. Fillon. Instead, Mr. Fillon trounced him.
The left suffered similar upheaval, with the expected winner of the Socialist primary, former Prime Minister Manuel Valls, losing to Benoît Hamon. Mr. Hamon floundered during the campaign and received less than 7 percent of the vote, a cratering of support for his party.
On the right, Mr. Fillon initially looked like a potential winner, but a nepotism scandal — in which he was accused of embezzling public funds by paying his wife and children to work as his assistants, although they appear to have done little work — defeated his efforts to make it to the second round.
“The obstacles put on my path were too numerous, too cruel,” he said, conceding defeat Sunday night.
In the meantime, Mr. Macron appears to have been in the right place at the right time, with mainstream candidates falling on either side and a far-right candidate whom many in France cannot imagine having represent the country.
That does not mean that people favor him, but rather that he was the “least worst” vote: an especially weak position for a candidate with no real party base behind him.
“I chose a ‘useful vote’ for the first round, and it really breaks my heart — it’s the first time I’m doing this,” said Monica Craignou, 40, who works in digital development in Paris.
Others saw in Mr. Macron the possibility for France to keep up with global changes. “We need someone young,” said Karine Filhoulaud, a 45-year-old web editor, who was at Mr. Macron’s victory party and danced alone long after the crowds had left. “He lives the transition: the environmental one, the digital one, the societal one.”