The Italian parliament has re-elected Giorgio Napolitano to serve a second term as president in an attempt to resolve the political stalemate left by February's inconclusive election.
The 87-year-old was elected with the votes of 738 of the 1,007 parliamentarians and regional representatives in a sixth round of voting after they had failed to find a mutually acceptable candidate in the previous attempts.
He is expected to try to push for the formation of a broad coalition government in a round of consultations with party chiefs starting next week.
A broad coalition has so far been rejected by the centre-left, which won most seats and refused to join forces with Silvio Berlusconi's centre-right.
However Mr Napolitano now has the power to dissolve parliament, which he did not have in the final months of his current term.
Reuters reports that most on the centre-left, which has been torn apart by internal divisions since the February vote, fear new elections and so may be more willing to come to terms with Mr Berlusconi.
The main centre-left Democratic Party (PD) is in disarray and its leader Pier Luigi Bersani and the party's executive committee have resigned.
As most of parliament cheered his re-election, demonstrators protested outside. By evening the crowd had swelled as thousands of people vented anger at an outcome that was widely seen as perpetuating the grip on the country of a discredited political class and favouring centre-right leader Silvio Berlusconi.
The 76 year-old media magnate, who was forced from office at the height of a debt crisis in 2011 and was still being written off until shortly before the election, now leads in the polls.
Mr Napolitano has been formally elected for a full seven-year term but most commentators believe that once the present political crisis is resolved, he will probably resign within a year. No president has ever been elected for a second term in a role which is, in normal times, largely ceremonial.