Labor and the Australian Greens have used their combined numbers in the Senate to defeat a package of bills to unwind the carbon tax.

The Senate has rejected the Abbott government’s legislation to abolish the carbon tax.

The package of nine bills was finally put to a vote in the upper house on Thursday after months of debate, but was defeated 33 votes to 29.

Labor and the Australian Greens used their combined numbers to quash the legislative bundle, prompting cries of “shame” from government senators.

The government has been trying to pass the carbon tax repeal bills as a matter of priority since December, but has faced an impasse in the hostile Senate.

It will be three months before the government can bring the legislation before parliament again but only the arrival of new senators in July is likely to produce a different outcome.

If the legislation was to fail again, it would provide a trigger for a double dissolution election.

The government tried numerous times to fast-track a vote on the carbon tax bills, but was rebuffed every time.

The Senate had previously defeated two other bills linked to the Gillard-era climate laws, one to abolish the Clean Energy Finance Corporation and the Climate Change Authority.