Changes to the Resource Management Act have passed the final hurdle in Parliament, with the help of the Māori Party.
The legislation was introduced a year and half ago, but only just squeaked through Parliament last night following fraught negotiations and without the help of the government's usual allies - the ACT Party and United Future.
Securing enough support for the resource management legislation has been a long battle for the government and it took months of negotiations to secure the crucial votes of the Māori Party.
The legislation is intended to make planning standards consistent and consent times shorter so it's easier and faster to build more homes.
However, it has been heavily criticised for giving the Environment Minister too much power and neglecting iwi consultation.
The third reading of the 250-page bill may have passed with the Māori Party's support but its co-leader, Marama Fox, has already condemned the way the process was handled.
Mrs Fox said the reform of the RMA was the worst parliamentary process she had ever experienced.
She acknowledged her party was "complicit" in passing the legislation, but said her goal was to make sure Māori were given more say over how resources were managed.
"What we wanted to do was to make sure that the Māori voice was not ignored and we had a number of bottom lines and we said if several things were in the law then we would not even start talking," she told a political debate organised by the New Zealand Planning Institute.
However, Environment Minister Nick Smith said the passing of the 700-clause bill was a "major milestone for the Government's reform programme".
Dr Smith said the changes would help increase the supply and affordability of housing, grow the economy, support infrastructure investment and improve environmental management.
"It will reduce unnecessary red tape and bureaucracy for kiwi homeowners, farms and businesses."
Earlier this month, NZ First leader Winston Peters appealed to National MPs to delay the passage of the bill and "step back from this separatist abyss".
"This country's very future is on the line and on this matter only you, as National Party members of Parliament, have the power to do what is right by the entire country."