By Gavin Jones and Naomi O'Leary
ROME (Reuters) - The Italian parliament on Saturday re-elected 87-year-old President Giorgio Napolitano to serve a second term in an attempt to resolve the political stalemate left by February's inconclusive election.
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 favoring centre-right leader Silvio Berlusconi.
The leader of the anti-establishment 5-Star Movement Beppe Grillo called on "millions" of Italians to protest against Napolitano's re-election which he called a "coup d'etat."
Napolitano 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.
In brief televised comments from his presidential palace, he said the coming weeks would be crucial for the country and called on all sides to "fulfill their duties."
In almost two months, Napolitano, one of the world's oldest heads of state, has failed to broker a solution to the gridlock that emerged from the February election which left no group with enough seats in parliament to form a government.
A broad coalition has so far been rejected by the centre-left, which won most seats and refused to join forces with Berlusconi's centre-right.
However Napolitano now has the power to dissolve parliament, which he did not have in the final months of his current term. 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 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.
"Berlusconi is the real winner because there will be a broad coalition that will be a disaster for the country," said Nichi Vendola, head of the small Left and Freedom party which looks ready to quit the centre-left alliance that fought the election.
GRILLO MAKES "CALL TO ITALIANS"
Tensions in the country are running high. Ordinary Italians are struggling with recession, falling living standards and rising unemployment and centre-left voters in particular have looked on aghast at developments since the election.
On his blog, Grillo said the traditional parties he blames for Italy's economic decline and corruption have already agreed to form a broad coalition to preserve the status quo.
"There are decisive moments in the history of a nation," he wrote in a post entitled 'call to Italians' in which he said he would travel personally to parliament that evening.
Later, as scores of police in riot gear stood outside the parliament building and rival protesters, many of whom appeared not to be from 5-Star, argued angrily, Grillo said he could not make it in time to Rome from the north of Italy.
Grillo's appeal to protest was condemned by mainstream politicians, some of whom said his language was reminiscent of wartime dictator Benito Mussolini's "march on Rome" which marked his rise to power in 1922.
5-Star rode a huge protest vote to become one of three main forces in parliament, driven by frustration at economic hardship and the perceived corruption of politics.
The main centre-left Democratic Party (PD) is in chaos after scores of rebels took advantage of secret ballots to sabotage the party's official candidates in previous presidential votes.
PD leader Bersani announced late on Friday that he would quit after the new president was elected, leaving the largest force in parliament rudderless and making prospects for broader political stability looking even weaker.
On Saturday Bersani's deputy, Enrico Letta, announced that the whole of the PD executive committee had resigned.
The transformation in the fortunes of Bersani, who three months ago seemed the likely next prime minister, underlined uncertainty over how a deeply-divided political class can implement much-needed reforms to tackle an economy that has stagnated for the last 20 years.
There will now be a leadership battle in the PD, founded to unite a range of smaller leftist and centrist parties in 2007.
Bersani's departure could make way for his arch-rival the 38-year old mayor of Florence Matteo Renzi, who has wide public support but is viewed with suspicion by the old PD hierarchy.
"Now the PD has the chance to really change, without any fear, we'll try," Renzi said in a tweet on Saturday.
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.
(Additional reporting by Giselda Vagnoni; Editing by Jason Webb)