The Government's flagship climate change legislation has been passed into law.
The bill that sets up the emissions trading scheme (ETS) was the last essential item that had to be passed before the election and it went through its third reading tonight on a 63-57 vote.
It has had a troubled history, and the Government was forced to negotiate for months with the Greens and New Zealand First to get a majority on it.
The Climate Change (Emissions Trading and Renewable Preference) Bill has implications for every household and the potential to change the make-up of the labour force as environmental factors gain increasing importance in business.
It will eventually bring all sectors of the economy under a regime which sets limits on the amount of greenhouse gas they can emit.
Those that breach their limit will have to buy credits from those that are below their cap.
Electricity comes under it in 2010, transport in 2011 and agriculture in 2013.
Climate Change Minister David Parker launched the third reading debate, saying he was proud New Zealand had risen to meet the greatest challenge facing the world.
He said New Zealand was joining 27 others nations that had adopted emissions trading schemes, and many others that were developing them.
"The ETS does not create costs, it minimises the cost of reducing emissions," he said.
"`It does so in a fair and effective way by charging the polluter for increases in emissions and rewarding decreases. It will save New Zealand hundreds of millions of dollars between now and 2012 alone."
Mr Parker said its provisions meant New Zealand could meet its obligations under the Kyoto Protocol, at the same time helping the country reduce emissions at the lowest possible cost.
National has opposed the bill from the start and the party's climate change spokesman, Nick Smith, said the ETS was not in a fit state to be put into law.
"National wants a balanced climate change policy," he said.
"If the Government is honest about wanting a world-leading ETS they should say that means having world-leading petrol and power prices as well."
Dr Smith said National was worried the ETS would cause job losses and force heavy industry overseas.
He said if National won the election it would amend the legislation.
"We will change it to a more balanced objective, to a target of a 50 per cent reducing in New Zealand's emissions by 2050," he said.
Labour, NZ First, the Greens and the Progressive Party supported the bill on its third reading.
National, ACT, the Maori Party, United Future and independent MPs Gordon Copeland and Taito Phillip Field voted against it.