In one of the closest results in Italian parliamentary history, deputies rejected the confidence vote by a wafer-thin 313 votes to 312.
The swing vote today came from Prodi's own coalition, a defecting deputy from Foreign Minister Lamberto Dini's tiny Italian Renewal party.
"I'm not bitter," Prodi said.
President Oscar Luigi Scalfaro accepted the resignation of the man who headed Italy's first government led by the left. Scalfaro asked Prodi to stay on in a caretaker capacity, the president's office said in a statement.
Acceptance of a government's resignation is automatic after a confidence vote defeat.
The outcome of the confidence test surprised financial markets and Prodi's own supporters, and provoked recriminations from the left and calls for early elections from the right.
Scalfaro, known to oppose early elections, will now begin a lengthy process of consultations with parliament's speakers, ex-presidents, and political leaders in order to form a new government.
Mayhem broke out in Italy's parliament as the result became known, with deputies shouting at each other and reaching for their mobile phones even before the vote count was announced by Chamber of Deputies speaker Luciano Violante.
A race will now be on to form the next government to ensure that a 1999 budget is passed before the end of the year.
The draft put forward by Prodi's government, containing 14.7 trillion lire ($9.0 billion) of deficit-cutting measures, is now null and void but could be resurrected by the next government, which will be the 56th administration for Italy since World War Two.
The no-confidence vote was called after the Communist Refoundation party rejected the draft budget and broke its 28-month accord guaranteeing Prodi's ruling coalition a majority in the Chamber.
Prodi had won over moderate communists, but their support was not quite enough. Moderate Marxists will lament the loss of Prodi's initiative to introduce a 35-hour work week.
Ironically, the one vote that brought down the government came not from the hard left or the opposition right, but from a deputy of a party that supported the ruling coalition.
A fuming Foreign Minister Lamberto Dini, who is head of the Italian Renewal party to which the deputy belonged, said the turncoat would be expelled from the party for defying the whip.
Former Prime Minister Silvio Berlusconi, who leads the opposition center-right Freedom Alliance bloc, said early elections were now inevitable.
"An election is the only way for a free and democratic nation," Berlusconi said. "A majority of people do not back the center-left...Elections re the only democratic solution."
While Interior Minister Giorgio Napolitano said Italy's international commitments were unaffected, Prodi's defeat could not have come at a more sensitive time for NATO allies preparing for possible air strikes against Yugoslavia.
NATO sources, who were watching the confidence vote closely, said the alliance would be "stuck" if Italy broke ranks with its 15 partners and said "no" to air strikes in the Kosovo crisis. Such a step would be unprecedented.
©1998 CBS Worldwide Corp. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press and Reuters contributed to this report