PARIS (AP) -- Centrist Emmanuel Macron and far-right populist Marine Le Pen advanced Sunday to a runoff in France's presidential election, remaking the country's political landscape and setting up a showdown over its participation in the European Union.
French politicians on the left and right immediately urged voters to block Le Pen's path to power in the May 7 runoff, saying her virulently nationalist anti-EU and anti-immigration politics would spell disaster for France.
"Extremism can only bring unhappiness and division to France," defeated conservative candidate Francois Fillon said. "As such, there is no other choice than to vote against the extreme right."
The selection of Le Pen and Macron presented voters with the starkest possible choice between two diametrically opposed visions of the EU's future and France's place in it. It set up a battle between Macron's optimistic vision of a tolerant France, a united Europe with open borders against Le Pen's darker, inward-looking platform that called for closed borders, tougher security, less immigration and dropping the shared euro currency to return to the French franc.
With Le Pen wanting France to leave the EU and Macron wanting even closer cooperation between the bloc's 28 nations, Sunday's outcome meant the May 7 runoff will have undertones of a referendum on France's EU membership.
The absence in the runoff of candidates from either the mainstream left Socialists or the right-wing Republicans party -- the two main groups that have governed post-war France -- also marked a seismic shift in French politics. Macron, a 39-year-old investment banker, made the runoff on the back of a grassroots campaign without the support of a major political party.
With 50 percent of the vote counted, the Interior Ministry said Sunday night that Le Pen had 24 percent of the vote, Macron had 22 percent, Fillon had 20 percent and far-right Jean-Luc Melenchon had 18 percent.
Melenchon refused to cede defeat. In a defiant speech to supporters, he said he would continue to await the results from France's cities. The early vote count includes primarily rural constituencies that lean to the right.
Le Pen, in a chest-thumping speech to cheering supporters Sunday night, declared that she embodies "the great alternative" for French voters. She portrayed her duel with Macron as a battle between "patriots" and "wild deregulation" -- warning of job losses overseas, mass migration straining resources at home and "the free circulation of terrorists."
"The time has come to free the French people," she said at her election day headquarters in the northern French town of Henin-Beaumont, adding that nothing short of "the survival of France" will be at stake in the presidential runoff.
Her supporters burst into a rendition of the French national anthem, chanted "We will win!" and waved French flags and blue flags with "Marine President" inscribed on them.
In Paris, protesters angry at Le Pen's advance -- some from anarchist and anti-fascist groups -- scuffled with police. Officers fired tear gas to disperse the rowdy crowd.
Macron supporters at his election day headquarters in Paris went wild as polling agency projections showed the ex-finance minister making the runoff, cheering, singing "La Marseillaise" anthem, waving French tricolor and European flags and shouting "Macron, president!"
Mathilde Jullien, 23, said she is convinced Macron will beat Le Pen and become France's next president.
"He represents France's future, a future within Europe," she said. "He will win because he is able to unite people from the right and the left against the threat of the National Front and he proposes real solutions for France's economy."
Fillon said he would vote for Macron on May 7 because Le Pen's program "would bankrupt France" and throw the EU into chaos. He also cited the history of "violence and intolerance" of Le Pen's far-right National Front party, founded by her father, Jean-Marie Le Pen, who was trounced in the presidential runoff in 2002.
In a brief televised message after the last polling stations closed, Socialist Prime Minister Bernard Cazeneuve urged voters to back Macron to beat the National Front's "funereal project of regression for France and of division of the French."
Socialist presidential candidate Benoit Hamon, who was far behind in Sunday's results, quickly conceded defeat. Declaring "the left is not dead!" he also urged supporters to back Macron.
Voting took place amid heightened security in the first election under France's state of emergency, which has been in place since gun-and-bomb attacks in Paris in 2015.
Polling agency projections for the overall race showed Macron in the lead with between 23 and 24 percent support, followed by Le Pen with between 21 and 23 percent.
Elaine Ganley and Alex Turnbull in Henin-Beaumont, Chris den Hond in Le Touquet, Angela Charlton, Raphael Satter, Samuel Petrequin, Nicolas Vaux-Montagny, Sylvie Corbet, Nadine Achoui-Lesage and Philippe Sotto in Paris and Brian Rohan in Cairo contributed to this report.