Prime Minister Manmohan Singh and his Congress party fought hard to secure victory, and appeared to cut back room deals when all else failed. An airport was named after one lawmaker's father, another was promised a high-level job and — rival politicians allege — many others received millions of dollars in bribes.
The ruckus forced a temporary adjournment of Parliament — but the stunt failed to stave off the opposition's defeat.
The government won with 275 votes for it and 256 against, a wider margin than many observers had predicted. Ten lawmakers abstained.
Afterward, Singh called the victory "convincing," telling reporters outside Parliament that it would "send a message to the world at large that India is prepared to take its place in the committee of nations."
That means pushing ahead with the nuclear deal, on which Singh has staked his premiership.
The deal is seen as the cornerstone of a budding strategic partnership between the United States and India, which was officially neutral during the Cold War but had warm relations with the Soviet Union. But the communist parties that provided Singh's government with its parliamentary majority have denounced it as a ploy to make India Washington's pawn.
The pact would end more than three decades of nuclear isolation for India, opening its civilian reactors to international inspections in exchange for the nuclear fuel and technology it has been denied by its refusal to sign the Nuclear Nonproliferation Treaty and its testing of atomic weapons.
To finalize the deal, India must now strike separate agreements with the International Atomic Energy Agency as well as the Nuclear Suppliers Group of countries that export nuclear material. The U.S. Congress will then need to approve the accord.
The White House on Tuesday welcomed the government's victory.
"We think that this idea of a U.S.-India civil nuclear arrangement is a good one for everybody," White House spokeswoman Dana Perino told reporters after the vote. "It's good for India because it would help provide them a source for energy that they need."
India imports about 75 percent of its oil, and Singh, the architect of India's 1991 transformation from a socialist-style economy to a capitalist one, has argued the country needs the nuclear deal to power its financial growth and lift hundreds of millions of its 1.1 billion citizens out of poverty.
Closing Tuesday's debate over the confidence motion, Singh said in a speech to lawmakers that the deal would "lead India to become a major power center of the evolving global economy."
But the speech was presented only in written form because shouting opponents kept Singh from speaking.
Even by the standards of India's theatrical and often chaotic political culture, the politicking of the past week and the actual debate were considered ugly.
A former solicitor general, Harish Salve, called the scandal-laden vote "the worst defeat of Indian democracy." He was especially horrified by the spectacle of lawmakers waving bundles of cash on Tuesday, which he termed "ghastly."
India's equally raucous media vacillated between blasting the alleged corruption and reveling in the spectacle of it all. One New Delhi tabloid newspaper, Mail Today, printed a graphic Tuesday illustrating how many suitcases would be needed to carry more than $5 million worth of rupees, the alleged going rate to bribe a lawmaker. The verdict: at least eight — and they'd weigh at least 690 pounds.
Singh was forced to call the confidence vote after the communist political parties withdrew their support this month to protest the deal.
The communists lined up with the right-wing BJP and other smaller regional and caste-based parties in their failed bid to topple the government, which survived by winning the support of one-time political enemies and minor parties.
PHOTO 1: Activists of the youth and women's wing of the Communist Party of India (Marxist) hold torches as they attend a rally opposing the Indo-US civilian nuclear deal in Hyderabad, India, Monday, July 21, 2008. Indian lawmakers gathered Monday to debate a vote of confidence in the government that will likely determine the fate of the landmark deal. (AP Photo/Mahesh Kumar A.)