Australia's plan for a 30% tax on the biggest profits in its booming mining industry has cleared its biggest political hurdle with legislation passing parliament's lower house after last-minute support from the Green party.

The vote is a major victory for the prime minister, Julia Gillard, and her Labor government after 18 months of acrimonious debate that brought down her predecessor, Kevin Rudd. Mining companies ran a public campaign against his original 40% tax plan.

Gillard wants the new tax on mining profits to pay for a company tax cut and boost pensions, helping to spread the benefits of Australia's resources boom to other parts of the economy struggling with the global downturn.

"This is a way in which all Australians share in the bounty of the mining boom," the treasurer, Wayne Swan, told parliament.

Gillard's minority government needs support from three independents and a Green for its one-seat majority in the lower house. The fate of the mining tax remained uncertain until late Tuesday because of concerns held by the Greens, who eventually agreed when the government came up with budget savings elsewhere to compensate for watering down the tax.

The legislation will go to the senate in early 2012. The government and the Greens have the numbers there to ensure the bills are passed into law.

The mining tax, being considered by other resource nations in South America and Africa, is a key policy for Gillard, who struck a deal on it with global miners BHP Billiton, Rio Tinto and Xstrata in July 2010.

Opposition conservatives of the Liberal and National parties accused the government of doing secret deals with the Greens that would hurt investment confidence, while Xstrata warned the government against additional levies on top of the 30%.

Xstrata's coal division head, Peter Freyberg, whose company will pay 80% of the expected tax revenue along with Rio and BHP, told Reuters that any additional moves to extract more money from the mining sector could drive new investment away.

The conservatives have promised to repeal the tax if elected, without saying how they will cover the pensions shortfall that would create.

Swan said that details of the government's deal with the Greens to pass the mining tax would be included in a mid-year budget update, expected within a fortnight.

"It's a worthy measure for Australia, it's a very significant economic reform, it's a huge win for the Australian people. I believe it will pass the senate after it is debated there in the new year," Swan told Australian radio.

The tax will start on 1 July 2012 and raise A$7.7bn in its first two years, which will be earmarked to fund company tax breaks and compensate business for higher payments into compulsory worker pension funds.

It will also pay for billions of dollars of investment in infrastructure in regional Australia, particularly the key mining states of Western Australia and Queensland. The tax will apply to about 30 of Australia's biggest miners. Although it is set at 30%, it will have an effective rate of 22.% when mining industry tax allowances are taken into account.

The tax faced concerted opposition from Labor's conservative opponents and small- and mid-sized miners, led by the iron ore magnate Andrew Forrest and his Fortescue Metals Group, who said the tax favoured global miners.

But the government said the tax would not hurt Australia's record investment in mining, with planned capital investment of A$430bn in Australian resource projects.

With strong demand from China, Australia's government commodities forecaster said in June it expected iron ore exports to grow 8% to 437m tonnes in the current year to 30 June 2012, with export income to grow 17% in the year despite lower world prices.

To win support in parliament Gillard agreed to lift the starting profits threshold for the tax from A$50m to A$75m and only phased in the full rate at $125m.

Gillard also agreed to spend A$200m from the tax revenue to fund research into the environmental impacts of coal seam gas developments, and to encourage state governments to use independent research when approving coal seam gas projects.

The mining tax vote came in the final week of parliament for 2011 and two weeks after Gillard successfully passed her landmark carbon price legislation.

The next elections are still up to two years away and polls show Gillard's government would be swept from office easily. But an Essential media poll on Monday found 51% support for the mining tax against 33% opposed, while elsewhere Gillard is polling as the preferred prime minister over her opponent, Tony Abbott of the Liberal party.