If the government had failed to win the budget vote, President Mahinda Rajapakse would have been forced to call a snap election or ask the party that commands a majority in parliament to form the next government.
The vote was also marked by last-minute crossovers by ruling coalition and opposition parliamentarians and allegations of vote buying.
Two TNA members were not present at the time of the vote.
TNA members had previously complained of receiving death threats.
One government cabinet minister, Amarasiri Dodangoda, who was ill, was brought to parliament in a wheel chair for the vote.
Parties aligned with the government, the Sri Lanka Muslim Congress, Hela Urumaya, Upcountry People's Front and Eelam People's Democratic Party, voted in favour of the budget.
Updated
The budget was passed at its second