France's Macron is Reelected But Far-right Rival Raises GamePARIS (AP) — French President Emmanuel Macron comfortably won reelection to a second term Sunday, according to polling agencies' projections. In the midst of Russia’s invasion of Ukraine, the result offered the European Union the reassurance of leadership stability in the bloc's only nuclear-armed power and was immediately hailed by France's allies. A second five-year term for the centrist Macron spares France and its allies the seismic upheaval of a wartime shift of power to Macron's populist challenger Marine Le Pen, who quickly acknowledged her defeat Sunday night but still appeared on course for a best-ever showing for her fiercely nationalist far-right policies. During her campaign, Le Pen pledged to dilute French ties with the 27-nation EU, NATO and Germany, moves that would have shaken Europe’s security architecture as the continent deals with its worst conflict since World War II. Le Pen also spoke out against EU sanctions on Russian energy supplies and faced scrutiny during the campaign over her previous friendliness with the Kremlin. A chorus of European leaders hailed Macron's victory. “Democracy wins, Europe wins," said Spanish Prime Minister Pedro Sánchez. “Together we will make France and Europe advance," tweeted European Commission President Ursula von der Leyen. Italian Premier Mario Draghi hailed Macron's victory as “splendid news for all of Europe” and a boost to the EU "being a protagonist in the greatest challenges of our times, starting with the war in Ukraine.” Polling agencies’ projections, released as the last voting stations closed, said Macron was on course to beat his rival by a double-digit margin. Several hundred Macon supporters happily gathered in front of the Eiffel Tower in Paris, waving French and EU flags to the beat of Daft Punk’s “One More Time." Five years ago, Macron won a sweeping victory over Le Pen to become France’s youngest president at 39. The margin is expected to be much smaller this time: Polling agencies Opinionway, Harris and Ifop projected that the 44-year-old pro-European centrist would win at least 57% of the vote. Le Pen was projected to win between 41.5% and 43% support -- a still unprecedented result for the 53-year-old on her third attempt to win the French presidency. Early official results in France’s presidential runoff are expected later Sunday night. If the projections hold, Macron would become only the third president since the 1958 founding of modern France to win twice at the ballot box, and the first in 20 years, since incumbent Jacques Chirac trounced Le Pen’s father in 2002. Le Pen called her results “a shining victory,” saying that “in this defeat, I can't help but feel a form of hope.” Breaking through the threshold of 40% of the vote is unprecedented for the French far-right. Le Pen was beaten 66% to 34% by Macron in 2017 and her father got less than 20% against Chirac. She and hard-left leader Jean-Luc Melenchon, one of 10 candidates eliminated in the first round of voting on April 10, both quickly pitched forward to France's legislative election in June, urging voters to give them a parliamentary majority to hamstring Macron. Le Pen’s score this time rewarded her years-long efforts to make her far-right politics more palatable to voters. Campaigning hard on cost-of-living issues, she made deep inroads among blue-collar voters in disaffected rural communities and in former industrial centers. The projected drop in support for Macron compared to five years ago points to a tough battle ahead for the president to rally people behind him in his second term. Many French voters found the 2022 presidential rematch less compelling than in 2017, when Macron was an unknown factor, having never previously held elected office. Leftist voters — unable to identify with either the centrist president or Le Pen’s fiercely nationalist platform — often agonized with the choices available Sunday. Some trooped reluctantly to polling stations solely to stop Le Pen, casting joyless votes for Macron. “It was the least worst choice,” said Stephanie David, a transport logistics worker who backed a communist candidate in round one. It was an impossible choice for retiree Jean-Pierre Roux. Having also voted communist in round one, he dropped an empty envelope into the ballot box on Sunday, repelled both by Le Pen’s politics and what he saw as Macron’s arrogance. “I am not against his ideas but I cannot stand the person,” Roux said. In contrast, Marian Arbre, voting in Paris, cast his ballot for Macron “to avoid a government that finds itself with fascists, racists.” “There’s a real risk,” the 29-year-old fretted. Macron went into the vote with a sizeable lead in polls but faced a fractured, anxious and tired electorate. The war in Ukraine and the COVID-19 pandemic battered Macron’s first term, as did months of violent protests against his economic policies, which created fertile ground for Le Pen. With the EU’s only seat on the U.N. Security Council and only nuclear arsenal, the outcome in France was being watched across the 27-nation bloc. France has played a leading role in international efforts to punish Russia with sanctions and is supplying weapons systems to Ukraine. Appealing to working-class voters struggling with surging prices, Le Pen vowed that bringing down the cost of living would be her priority and argued that Macron’s presidency had left the country deeply divided. Macron sought to appeal to voters of immigrant heritage and religious minorities, especially because of Le Pen’s proposed policies targeting Muslims and putting French citizens first in line for jobs and benefits. Macron also touted his environmental and climate accomplishments to trawl for young voters who backed left-wing candidates in round one. Macron said his next prime minister would be put in charge of environmental planning as France seeks to become carbon neutral by 2050. ___ Associated Press journalists Thomas Adamson, Sylvie Corbet and Elaine Ganley in Paris, Michel Spingler in Henin-Beaumont, and Alex Turnbull in Le Touquet, contributed.