India's Congress party-led government has survived a vote of confidence over a civilian nuclear deal with the US.
The government motion received 275 votes with 256 against, Speaker Somnath Chatterjee said, hours after adjourning the debate amid claims of vote buying.
The vote came after the government's left-wing allies withdrew their support in protest at the controversial accord.
If the government had lost the vote, India would have faced early elections, casting the nuclear deal in doubt.
The lower house was packed to capacity, with MPs summoned from their sick beds and even from prison cells to take part in the vote.
After it was held there was brief confusion over the counting process. Most voting was electronic, but about 50 votes were cast on paper which delayed the result.
At least four MPs were too ill to vote from the chamber of the 543-seat house itself, but it is still not clear why so many MPs cast paper ballots.
A number of MPs also abstained.
TIMETABLE FOR NUCLEAR ACCORD
A nuclear reactor in India
Approval needed from IAEA, expected to meet on 1 August
Consent also required from 45-member Nuclear Suppliers Group
Congress to approve deal before President Bush signs it into law
All this to happen before Mr Bush's tenure expires on 19 January 2009
There were Congress celebrations when victory became clear, with dancing supporters cheering, clapping and letting off firecrackers in front of party leader Sonia Gandhi's house in Delhi.
Prime Minister Manmohan Singh thanked MPs for "such a convincing victory".
"This will send a message to the world at large... India is prepared to take its rightful place in the comity of nations," he told reporters.
The US welcomed the result and said it would work closely with the Indian government to have the deal ratified.
The BBC's Sanjoy Majumder in Delhi says the vote had looked too close to call.
But the government managed to scrape through with the support of smaller parties and independent members.
India faces a general election next year and many political parties have used the debate over the nuclear deal to stake out their positions ahead of the polls, our correspondent says.
The deal itself is now more dependent on whether it gets through the US Congress before elections in November, than on political opposition in India.
Two days of debate on the nuclear accord ended in uproar amid opposition allegations of vote buying.
Opposition Bharatiya Janata Party (BJP) members waved fistfuls of money in the air, alleging that they had been offered bribes to abstain.
Opposition MPs wave 30 million rupees allegedly paid to buy their votes
Mr Chatterjee adjourned proceedings for several hours. He called it a "very sad day" for the Indian parliament, adding: "Nobody will be spared if found guilty."
The prime minister has promised his party will co-operate in an inquiry into the claims.
With the left withdrawing support, the government could rely on only 226 members in the 543-seat parliament, and needed 46 more to be absolutely sure of a majority.
India's media was awash with reports of alleged defections and desertions among MPs ahead of the vote.
Under the accord, India, which has not signed the nuclear Non-Proliferation Treaty, would gain access to US civilian nuclear technology and fuel.
Prime Minister Manmohan Singh addresses the media after winning the vote of confidence in New Delhi on July 22, 2008
Mr Singh called the victory "impressive"
In return its civilian nuclear facilities would be opened to inspection. Nuclear weapons sites would remain off-limits.
The communists fear the accord could give the US too much influence over Indian foreign and nuclear policy.
The main opposition Hindu nationalist BJP fears that the deal could compromise India's ability to test nuclear weapons in the future.
India is under pressure from Washington to sign the accord before the US presidential election in November.
Last week, Indian officials met members of the International Atomic Energy Agency (IAEA), the world nuclear regulatory body, in Vienna to discuss plans to safeguard India's civilian nuclear facilities.
The IAEA's approval of the plan is a key condition for enacting the deal.
Whether the government stays in power or not, it has lost the credibility and confidence of people.
If the IAEA signs the agreement, the deal will go to the 45-nation Nuclear Suppliers Group, which regulates global civilian nuclear trade, for approval.
It must then be approved by the US Congress before President Bush can sign it into law.
Critics of the deal fear assistance to India's civil programme could free-up additional radioactive material for bomb-making purposes.
|Liveleak on Facebook|