MPs have narrowly voted to put the decision on legalising assisted dying to a referendum at the next election.
A crucial vote on whether to let the public have the final say on Act leader David Seymour's End of Life Choice to Bill has passed 63 votes to 57 in Parliament.
The polarising legislation – which would let terminally ill adults request voluntary euthanasia – now has to pass a third reading in the House in November. If it does – which is likely - the public will have the last word next year.
The referendum would sit alongside a separate one on legalising recreational cannabis.
• End of Life Choice Bill euthanasia law inches closer to final vote
• Euthanasia bill moves forward despite fierce opposition in Parliament
• Euthanasia bill passes second reading
• Crucial euthanasia bill referendum vote on a knife-edge
During a debate on Wednesday over whether to hold a euthanasia plebiscite, New Zealand First's members made clear they would vote against the legislation as a block if the referendum was rejected.
NZ First MP Mark Patterson took an entire speech to make the point.
The End of Life Choice bill passed its second reading – in June – 70 votes to 50 and without NZ First's nine votes its odds of surviving a third vote were miniscule.
That left many politicians who support the legislation begrudgingly voting for a referendum to keep the bill alive, including Prime Minister Jacinda Ardern.
Labour's Kieran McAnulty reflected on the dilemma in his speech to the House.
"In a perfect world I would have voted no to a referendum … The MPs of this house have been given a job" McAnulty said.
"But I am a bookmaker and I know how to count."
Seymour himself said he didn't feel strongly either way about the referendum, but saw it as a necessity. He's been working with NZ First to try to get support.
Afterwards, Seymour said he wouldn't be celebrating yet.
"My confidence on this bill has always been very quiet. We'll continue to work for every vote. That's the only way we got this far," he told reporters.
"We're not there yet … There's still the big vote to come."
Meanwhile, opponents of the legislation railed against the referendum on Wednesday, saying it would be an abdication of power by MPs paid to make hard decisions.
National's Alfred Ngaro told the House it would be "irresponsible".
"Why would you want to unleash a complex and difficult and socially-impacting decision onto a public by a 'yes' or a 'no'?" he asked.
Labour MP Louisa Wall – who strongly supports the legislation – also spoke against a referendum, saying the public debate it would cause would be too divisive and that she feared many voters did not know enough about the issue.
NZ First's Jenny Marcroft – the sponsor of the referendum – said politicians needed to trust the public.
"This issue basically, directly affects the fabric of society and so we believe that temporarily empowered politicians … we alone should not decide on the bill," Marcroft said.
NZ First MP Tracey Martin told reporters the vote was a win for the party and a relief.
"It means the public will, for the first time, have a real say about legislation and a proper referendum with a bill and a regulatory impact statement," she said.
The referendum question would ask the public whether they support the End of Life Choice Bill becoming law, rather than a more general question about euthanasia.
Seymour has made a large number of changes to the legislation since its second reading to make sure he retains supports for the upcoming third.
Most significantly, it now only gives access to assisted dying to those with six months left to live, while it previously also covered those with "grievous and irremediable" medical conditions.
It's not yet clear whether the changes have won any additional votes or kept all those from the second reading.
It needs 61 votes to pass, making NZ First's backing crucial. With its support, it will most likely clear the third reading.
National's Chris Penk, who has staunchly opposed the bill throughout, said he believed the vote would narrow.
"The trend is the more exposure people have to the bill the less they like it, and I'm sure that the average New Zealander is probably as smart as the average time," he said.
"So that gives me sanity will prevail in 12 months from now."
The legislation will return to Parliament for its final reading on November 13.
Polling has suggested the public would vote for euthanasia at a referendum.
Victoria University research fellow Jessica Young, an expert on the issue of assisted dying, said over the past 20 years public support for some form of assisted dying has averaged about 68 per cent.
Public campaigns surrounding the End of Life Choice Bill have not shifted the mood much either, with a 1 News Colmar Brunton Poll in July – ahead of the second reading – saying about 72 per cent of the public supported assisted dying of some sort.