ROME (AP) -- Italy's Parliament on Saturday re-elected Giorgio Napolitano to an unprecedented second term as president, after party leaders persuaded the 87-year-old to serve again in hopes of easing the hostility that has thwarted formation of a new government.
Napolitano easily surpassed the simple majority required to be elected Saturday afternoon. He garnered 738 votes, far more than the 504 needed for victory for another seven-year mandate.
Parliament had a much harder time. It took it three days of balloting to choose a president, reflecting the legislature's deep polarization following inconclusive nationwide elections in February.
After the weeks of stalemate, Napolitano can formally begin one of the head of state's most important tasks once he takes a new oath of office. He must figure out who has the best prospects of putting together a new government, with enough support to successfully work with Parliament and survive a mandatory vote of confidence.
That won't be easy. Italy's main political parties -- essentially three distinct ideological blocs in Parliament and their often shifting allies -- are heavily polarized, and antagonism only grew sharper during the gridlock.
Napolitano, a former Communist, will have to quickly start sounding out parties about a potential premier. The next government faces pressure to bring urgently needed economic and electoral reforms to the recession-mired nation.
Italy has had a caretaker government for months, led by economist Mario Monti, a Napolitano appointee whose harsh austerity measures of higher taxes, pension reform and slashed spending helped keep Italy from succumbing to the debt crisis.
Napolitano, citing his advanced age, had repeatedly refused to be a candidate for another term that would see him turn nearly 95 when it runs out. But he yielded to the appeals out of a sense of responsibility toward the nation, he said.
"We must all look, as I tried to do in these hours, at the difficult situation of the country, at the problems of Italy and Italians, and the international image and role of our nation," Napolitano said in brief remarks from the presidential palace after his re-election. He said he would elaborate on how he planned to carry out his mandate in a speech Monday.
Monti, whose own election bid to stay on as premier was soundly rejected by angry voters, telephoned Napolitano to thank him for having agreed "with great spirit of sacrifice" to continue.
Pope Francis in a telegram hailed Napolitano's wisdom and prayed that the president receive "constant divine assistance" on the job. Saying he blessed both Napolitano and the Italian nation, he encouraged the country to "build a future of harmony, solidarity and hope."
The White House welcomed the decision in a statement, saying Napolitano's continued leadership "will ensure that we move forward together in facing the challenges of our times."
While Napolitano's election received a standing ovation from lawmakers and plaudits from abroad, several thousand people protested noisily outside Parliament, disappointed that Italy's old political guard hadn't changed.
Lawmakers from Parliament's third-largest bloc, the anti-establishment 5 Star Movement led by comic-turned-political agitator Beppe Grillo, galvanized supporters for the protest. Grillo had backed a left-leaning constitutional law expert for president.
Grillo and his fast-growing movement are bitterly opposed to the incumbent, who in late 2011 appointed Monti and a Cabinet of technocrats to replace an elected premier as the eurozone debt crisis threatened to engulf Italy.
Hours earlier, Parliament held a fifth -- and yet again unsuccessful -- ballot to choose a head of state. Even as senators, deputies and regional electors put their folded paper ballots into urns in the Chamber of Deputies, leaders ranging from Monti to ex-Premier Silvio Berlusconi, were paying calls on Napolitano at the presidential palace to beg him to consider serving again.
Napolitano's office said the leaders had made a "fervent appeal to reconsider his oft-given reasons to be unwilling to have a second term."
Italy's presidents traditionally serve only one term, but there is no prohibition against a second mandate.
Napolitano could serve part of the term, long enough to encourage agreement over the leader and makeup of the next government and shepherd the electoral reforms.
Among those beaming and applauding Napolitano's re-election was Berlusconi. The billionaire businessman fell short in a comeback attempt in February elections for a fourth term as premier.
The conservative leader is eager to have a government that might rein in Italian prosecutors whom he contends sides with the left and is responsible for his judicial woes, including a trial in Milan for allegedly paying an underage teenage woman for sex. Berlusconi has proclaimed his innocence.