A last-minute change of heart in his favour by the far-left Rifondazione Comunista followed a series of last-minute negotiations to ward off a full-blown government crisis. Mr Dini won 310-291 and now has breathing- space to see the 1996 budget, crucial in the battle to bring down the soaring public deficit, pass through Parliament.
"This is a crisis which the country does not deserve, which economic conditions do not permit, and which in the light of the needs of the people is irresponsible," he said during a spirited 45-minute address to the Chamber of Deputies.
Mr Dini's victory was a blow to his predecessor and chief detractor, Silvio Berlusconi, whose conservative Freedom Alliance had called the no-confidence motion following a dispute over the dismissal of the Justice Minister, Filippo Mancuso. Mr Berlusconi had accused Mr Dini of plotting to get rid of Mr Mancuso for political ends.
He now has no chance of leading his coalition into general elections before the start of his trial on corruption charges on 16 January and must face a growing chorus of dissenters anxious to replace him as the centre-right's prime ministerial candidate.
Mr Dini's non-political government, installed nine months ago to break the deadlock created by the collapse of Mr Berlusconi's administration, had seemed doomed because the no-confidence motion was supported by the Freedom Alliance and Rifondazione Comunista, which together outnumber the pro-government centre-left parties.
Rifondazione has consistently opposed Mr Dini's budget proposals, saying they were against the interests of the Italian working-class. But the determination of its leader, Fausto Bertinotti, to undermine the Dini government faltered, say political sources, when he realised he would be deprived of all electoral alliances with the mainstream left, alienate his grassroots supporters and risk losing half his 24 deputies at the next general election.
Mr Dini persuaded Rifondazione to abstain from voting in exchange for a commitment, made in his speech, that he would resign by the end of the year. This was not much of a concession, since he has always said he would resign as soon as he had completed the four key tasks he had been mandated to carry out. Only one - the television airtime accorded parties during election campaigns - is still outstanding.
Mr Dini won wide praise for the combative, statesman-like style of his speech. In particular, he demolished one by one a series of allegations of bad faith levelled at him and at President Oscar Luigi Scalfaro by Mr Mancuso.
He was also confident enough to raise the prospect of renewing his mandate to rewrite the country's electoral laws and see Italy through its six- month presidency of the European Union, which starts on 1 January. "If no consensus for this emerges, we could at least pass the budget and then head for elections in a more relaxed atmosphere," he added.
Mr Dini is not entirely out of the woods, however. Mr Berlusconi could still threaten to oppose the budget when it comes up for parliamentary approval in the next few weeks - this time with the certain backing of Rifondazione Comunista. It would be a high-risk strategy, since many of Mr Berlusconi's more moderate supporters have already publicly backed the budget.