Kevin Rudd says the stimulus plan is vital to the national interest
Australia's Senate has passed the Labor government's A$42bn ($27bn; £19bn) stimulus plan after the bill was blocked during an earlier vote.
It was approved after the government reached a deal with an independent senator who had earlier joined the Liberal Party-led opposition.
Prime Minister Kevin Rudd says the bill is vital to boost the economy amid a global economic slowdown.
On Friday the Australian Senate backed the bill by 30 votes to 28.
Labor does not have a majority in the Senate, and some compromise had been expected.
The approval came after the government agreed to A$1bn in extra funding for water projects.
"I'm pleased to say I believe we have been able to reach a compromise, which while not giving everybody what they want, may give everyone what they need," said independent senator Nick Xenophon, who had blocked the plan a day earlier.
Treasurer Wayne Swan, who led the negotiations with Mr Xenophon, said: "We are prepared to act in the national interest.
"That's what governs the fiscal stimulus package in the first place."
The bill had already passed once through the House of Representatives, the Senate's lower chamber, where Labor has a large majority.
It will now return to the lower house in its amended form for a further vote.
The plan proposes spending A$28.8bn on schools, housing and roads over four years.
In addition, it wants to dedicate A$12.7bn on tax breaks for small firms, and cash handouts for eligible workers and students.
The opposition has called the stimulus plan financially irresponsible.
Opposition leader Malcolm Turnbull had said the government was treating parliament with "disingenuous contempt", accusing it of refusing to negotiate a less expensive package.
But business leaders had expressed their frustration at the Senate's earlier rejection of the stimulus plan.
"No other nation's parliament has refused a major stimulus package in the current environment of unprecedented global economic downturn," said the Australian Chamber of Commerce and Industry.