PARIS (AP) -- French President Emmanuel Macron comfortably won a second term Sunday, triggering relief among allies that the nuclear-armed power won't abruptly shift course in the midst of the war in Ukraine from European Union and NATO efforts to punish and contain Russia's military expansionism.
The second five-year term for the 44-year-old centrist spared France and Europe from the seismic upheaval of having firebrand populist Marine Le Pen at the helm, Macron's presidential runoff challenger who quickly conceded defeat but still scored her best-ever electoral showing.
Acknowledging that "numerous" voters cast ballots for him simply to keep out the fiercely nationalist far-right Le Pen, Macron pledged to reunite the country that is "filled with so many doubts, so many divisions" and work to assuage the anger of French voters that fed Le Pen's campaign.
"No one will be left by the side of the road," Macron said in a victory speech against the backdrop of the Eiffel Tower and a projection of the blue-white-and-red tricolor French flag. He was cheered by several hundred supporters who happily waved French and EU flags.
"We have a lot to do and the war in Ukraine reminds us that we are going through tragic times where France must make its voice heard," Macron said.
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 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, since France has played a leading role in international efforts to punish Russia with sanctions and is supplying weapons to Ukraine.
"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 called Macron's victory "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."
Macron won with 58.5% of the vote to Le Pen's 41.5% -- significantly closer than when they first faced off in 2017.
Macron is the first French president in 20 years to win reelection, since incumbent Jacques Chirac trounced Le Pen's father in 2002.
Le Pen called her result "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 on April 10, both quickly pitched forward Sunday night 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.
Le Pen voter Jean-Marie Cornic, 78, said he cast his ballot for her because he wanted a president who would prioritize "our daily lives -- salaries, taxes, pensions."
The 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.
Leftist voters -- unable to identify with either the centrist president or Le Pen -- agonized with Sunday's choice. 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 as the firm favorite 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.
In celebrating victory, Macron acknowledged a debt to voters who helped get him over the line, "not to support the ideas I hold, but to block those of the extreme right."
"I want to thank them and tell them that I am aware that their vote obliges me for the years to come," he said. "I am the custodian of their sense of duty, of their attachment to the Republic."