The members of the senate, the upper house of parliament, defeated a motion of confidence in the 20-month-old administration by 161 votes to 156 with one abstention.

President Giorgio Napolitano will now have to decide what to do next. He is thought to favour an interim government that would last perhaps only a few months and steer through a reform of the electoral law.

A member of Mr Berlusconi's inner circle told the Guardian: "Whatever happens, it's just a matter of time". He said the media mogul expected to be back in the prime minister's office by autumn at the latest.

The result was declared at the end of a tumultuous debate in which one senator was spat on and had to be carried from the chamber on a stretcher.

Another hobbled forward to cast his vote on crutches. He had been driven down from near Milan in an ambulance for the crucial ballot.

The Prodi government plunged into crisis on Monday when it was deserted by a tiny party whose leader, the former justice minister, left the cabinet on learning he was a suspect in a corruption probe. Other small groups and some individuals peeled off subsequently.

The odds against the government's survival had been stacking up relentlessly since before Christmas. The former EU Commission president's term of office has seen modest economic growth. But for many Italians its benefits have been offset by heavy taxation imposed to get the public finances within limits set by membership of the euro.

An announcement last month by the EU's statistical office that Spaniards were now earning more in real terms than Italians had a crushing effect on national morale. Days later, garbage began piling up on the streets of Naples - an all-too-tangible sign of political mismanagement and the still-pervasive influence on Italian society of organised crime.

The continuing rubbish emergency was the latest of several to which Mr Prodi's government has reacted sluggishly. According to the latest poll, carried out for the state-owned RAI broadcasting corporation, Mr Berlusconi and his right-wing allies enjoy a giant, 15 point lead.

The country now faces a period of paralysis as either a new coalition is formed or fresh elections held. In a final effort to attract support, Mr Prodi told the senate delay was "a luxury Italy cannot permit itself."

There was uproar during the debate that followed when Stefano Cusumano, a Sicilian lawmaker belonging to the party that prompted the crisis, announced he was remaining loyal to Mr Prodi after all. Proceedings were suspended after opposition lawmakers screamed "lump of shit", "cuckold" and "squalid pooftah".

He was spat at, fainted and was carried out. The incident came amid a barrage of claims by Mr Berlusconi's followers that the government was "buying" votes with dubious favours.