MPs in Parliament have erupted in applause as the Zero Carbon Bill passed its final reading, with support from the National Party.
Prime Minister Jacinda Ardern said New Zealand is on the "right side of history", telling Parliament: "I absolutely believe and continue to stand by the statement that climate change is the biggest challenge of our time."
The Bill, put forward by Climate Change Minister James Shaw, passed with the support of the National Party, which is promising to make changes to it if elected in 2020.
- National Party supports Zero Carbon Bill in its final reading
- Poll: Should the Government declare a national climate emergency?
- Insults fly at Zero Carbon Bill reading as MP takes shot at 'obnoxious' Shane Jones
The legislation didn't need National's support to pass because Labour, the Greens and New Zealand First make a majority. But Shaw has been working to get National's support.
Shaw called the legislation "historic", saying Parliament is taking "a significant step forward in our plan to reduce New Zealand's emissions".
Several MPs from both sides of the House congratulated the minister for getting the legislation across the line with bipartisan support.
The Bill had nearly 11,000 written and oral submissions. The select committee heard from parents, students, scientists, farmers, academics, health professionals, activists, iwi, local government and many more.
"This Bill belongs to New Zealand, and together we have ensured law that ensures we shift towards a low emissions country that keeps us all safe," Shaw said.
The Bill's passing has been praised by several environment groups, including Forest & Bird, Worldwide Fund for Nature (WWF), Greenpeace; and even DairyNZ said the bipartisan support "gives farmers certainty".
The Prime Minister rose to say she was "really proud to stand in this House today for what is a historic moment".
"I think it is important, when we stand in these moments in time, to remember the reason why we are here today debating this issue in the first place," she said.
"We're here because our world is warming - undeniably, it is warming."
- James Renwick: Debunking common climate change myths
- Kiwi experts weigh in on climate emergency, says 'the science is clear'
- Scientist knocks 'complacent attitude displayed by Judith Collins' on climate change
Ardern said she was proud that, for the "first time in 10 years... we're no longer having the debate over whether or not that is the case - we're merely debating over what we do about it".
"Undeniably, our sea levels are rising, and undeniably, we are experiencing extreme weather events - increasingly so.
"Undeniably, the science tells us the impact there will be on flora and fauna, and yes also the spread of diseases in areas where we haven't previously seen them."
Deputy Prime Minister and NZ First leader Winston Peters said the Bill's passing was the result of "months of hard work went into negotiating a balanced outcome between the parties of government on the issue".
Introducing a Zero Carbon Act and an independent Climate Commission, based on the recommendations of the Parliamentary Commissioner for the Environment, is listed in the Labour-NZ First coalition agreement.
The Bill's passing also fulfils part of the Labour-Greens confidence and supply agreement.
What will the law change?
The Zero Carbon Bill commits New Zealand to keeping global warming below 1.5degC.
Ardern said the Government is embedding it in legislation not just because of the Paris Agreement - which National signed up to in 2016 - but because it would show "our Pacific neighbours" that New Zealand wants to help.
The Bill will also lead to the establishment of a Climate Change Commission which will "help us to establish the targets that we need across the spectrum, and will provide for us advice on issues like methane".
National leader Simon Bridges said if the party's elected in 2020, it will be up to the Climate Change Commission to decide on the methane reduction target, continuing its pushback against the 24-47 percent reduction by 2050 in the current Bill.
Ardern said the legislation already allows for that, telling Parliament: "The claim that we should listen to the Climate Change Commission is already embedded in the legislation."
She said the commission would be able to give any government of the day their advice on targets and that includes the methane target, based on scientific evidence.
Federated Farmers says the 2050 24-47 percent reduction target for biogenic methane "remains eye-wateringly hard for farmers to achieve".
You can read about the other changes National wants here.
So far, ACT is the only party that hasn't supported the legislation.
"The Zero Carbon Bill also gives the Climate Change Minister unconstrained power over the New Zealand economy," ACT leader David Seymour said.
Seymour is pushing back against a part of the legislation that requires emissions offsets to take place in New Zealand.
He proposed an amendment that would have allowed New Zealanders to achieve emissions reductions at the lowest possible cost by purchasing overseas units as well as domestic units.
"It shouldn't matter if trees are planted in Northland or in the Amazon."