France wound up a long and rancorous presidential campaign Friday with opinion polls predicting victory for Francois Hollande, the Socialist candidate who promises economic stimulus measures to soften the austerity cutbacks imposed by President Nicolas Sarkozy during the European debt crisis.

Sarkozy, a business-oriented conservative battling for a second five-year term, told his followers in a final rally that the race was not over despite what the polls and political commentators said. Political specialists explained that he was counting on a bloc of undecided voters — estimated at up to 10 percent of the electorate — to tip the balance in his favor at the last minute before Sunday’s runoff ballot.

“Never, I think, has an election been so undecided,” he said Friday in a broadcast interview.

Hollande, also citing the danger of the undecided vote, appealed to his backers not to become complacent. “The polls are there, and they show a closing of the gap,” he said in a radio appearance. “So I say to all those who want me to be the next president, don’t let others decide in your place.”

At stake was not only France’s approach to dealing with dangerously high debts that have undermined faith in the euro, the European Union’s common currency, and raised doubts about the union’s economic stability. Hollande’s candidacy also constituted a challenge to the E.U.’s insistence — led by Chancellor Angela Merkel of Germany — that the deficits and debts must be whittled down across the continent even if the price is more unemployment and economic stagnation.

Hollande repeatedly has pledged to renegotiate an E.U. treaty agreed on in December that binds the 27 governments to bring down their deficits under threat of fines. The treaty must be expanded to include measures designed to promote economic growth, he said, since that is the only way to put money in people’s pockets, increase tax revenues and bring a permanent end to the crisis.

Sarkozy championed the treaty alongside Merkel as bitter but necessary anti-crisis medicine. In campaign discussions, he has decried Hollande’s pledge as irresponsible economics and a betrayal of France’s word. But several other European leaders, including conservatives, have joined Hollande recently in saying the E.U. must take urgent measures to promote economic growth and cannot focus on austerity alone as the solution.

Despite the economic stakes, the French race has also revolved around Sarkozy’s edgy personality and, in the last two weeks, appeals to anti-immigrant sentiment among far-right voters who in the first round backed Marine Le Pen of the National Front. Sarkozy’s ability to pull in those voters will in large measure determine his fate, according to Thierry Vedel, a researcher at the prestigious Political Studies Institute in Paris.

Francois Bayrou, the centrist Democratic Movement leader who won 9 percent of the first-round vote, announced Thursday that he will vote for Hollande to dramatize his opposition to Sarkozy’s move to the hard right. Bayrou said he does not accept the economic policies put forward by Hollande but at the same time cannot endorse Sarkozy’s resort to anti-immigration and nationalism.

“The line Nicolas Sarkozy has chosen is violent,” Bayrou explained. “It contradicts our values.”

Commentators emphasized how unusual Bayrou’s decision was, saying the widely respected centrist leader usually moves to the right or, as in 2007, refuses to take sides in the runoff round. “It is an earthquake,” wrote Alain Dusart in the Est Republicain newspaper. But polling specialists predicted it will have only a minor effect on the outcome.

Sarkozy challenged the decision as illogical, asking how Bayrou could vote for Hollande after condemning his economic proposals as unrealistic and dangerous for the heavily indebted French government. “It’s hard to see the coherency,” he said.

Two major opinion polls published Friday showed Hollande leading Sarkozy by 52.5 percent to 47.5 percent, confirming a lead that has been consistent for months. The new results marked a tightening from similar polls last week, the polltakers noted, but still gave Hollande a comfortable edge.

The polls were taken just after Wednesday evening’s face-to-face debate between Sarkozy and Hollande, the first and only such event of a campaign that, according to French law, ends at midnight Friday.

Commentators generally concluded that Hollande came out on top of the televised confrontation, refusing to let the usually aggressive Sarkozy play the dominant role. As expected, however, the debate seemed to have changed few people’s minds, they noted.