PARIS — Manuel Valls, a center-leaning former prime minister who rallied France together after extremist attacks, will confront stalwart Socialist Benoit Hamon in the country’s left-wing presidential primary runoff next week.
Hamon, a former government minister, was leading Sunday with 36.12 percent of the votes, followed by Valls with 31.24 percent, with about half the ballots counted, according to the results published on the Socialist primary website.
Whoever wins the Jan. 29 primary runoff will face the April-May presidential election battling candidates from the far right to the far left who are riding frustration with immigration and economic stagnation.
In France and across Europe, far-right populist parties are gaining strength, while leftist parties that played a central role in building modern Europe are in crisis.
In Britain, Italy, Poland, and other nations, voters are leaving center-left parties. Leftist politicians are struggling for survival as politics have been inflamed by anger against migrants and the policies of the European Union.
Tough-talking, center-leaning Valls jumped in the presidential race in December a few days after President Francois Hollande, acknowledging his personal unpopularity would lead his Socialist party to defeat in the presidential battle, declined to seek reelection.
Somber but combative, Valls called for left-wing voters to rally behind him as a bulwark against the French far right and ‘‘the America of Donald Trump, the Russia of Vladimir Putin.’’
Valls, 54, a Spanish immigrant who calls himself ‘‘deeply European,’’ has rallied against populism even as polls show rising support for anti-immigration, anti-EU sentiment.
Valls urged voters to choose him as a representative of the ‘‘credible left’’ instead of what he described as an idealist candidate who makes ‘‘promises that cannot be fulfilled.’’
He criticized Hamon’s pledges to pay a universal income as a massive budget burden that diminishes the value of work, and promised to continue reforms to adapt leftist ideas to the 21st-century economy.
Valls has faced fierce attacks from harder-left rivals who associate him with Hollande’s unpopular moves to relax labor protections to encourage hiring.
He argues that he has the experience that France’s next leader will need as the country is facing the threat of extremist attacks, and to revitalize a lagging economy.
He is promising to decrease taxes for modest and middle-class households and to boost police and defense.
Hamon, 49, is a lower-profile politician yet he gained popularity in recent years by leading a group of rebel Socialist lawmakers who opposed Valls.
A former junior minister and education minister, he left the government in 2014 after he expressed disagreement with Valls’s pro-business policies.
He is pledging to push for the introduction of an $800 ‘‘universal income’’ living allowance for all adults in the country.
Hamon said Sunday that he hopes to make the French ‘‘believe again in the left’’ and insisted his priorities are social and ecological issues.
Arnaud Montebourg, another former minister who criticized Valls’s economic policies, secured third place in Sunday’s voting. He called for his voters to support Hamon in the runoff to ensure a candidate that can resist the ‘‘brutal’’ candidacies of pro-free market conservative Francois Fillon and National Front leader Marine Le Pen.
‘‘Next Sunday, I will vote for Benoit Hamon and I invite you to do the same,’’ Montebourg told supporters Sunday night. By depriving Valls of the first place that might have been expected of a prime minister, Montebourg said, the primary’s voters ‘‘massively and seriously condemned the current presidential term.’’