ROME - 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.

From Brussels, European Commission President Jose Manuel Barroso said in a congratulatory note that Napolitano will serve at a time when EU nations must "display great calmness, courage and farsightedness" amid calls from Europe's citizens for restored growth and jobs.

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."

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.

"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."

Giorgio Napolitano, president