New Zealanders will almost certainly face a referendum next year on whether to legalise voluntary euthanasia after a make-or-break vote in Parliament cleared the way.
The legislation still needs to pass its third and final reading in Parliament next month, but the referendum's green-light makes that highly likely by ensuring the continued support of NZ First's nine MPs.
The referendum was a bottom line for NZ First and its nine votes were considered near-essential for getting the proposed law over the line.
Speaking in Parliament, the bill's sponsor, ACT leader David Seymour, urged MPs to throw their support behind a public vote and asked them to consider it "one last chance" for the public to veto the legislation if they so chose.
"When you are faced with complexity and a wide range of different circumstances - people [who] find themselves with imponderable situations - the only solution that anybody can stand by on a principled basis is to give choice."
For the first time during the debate in Parliament, NZ First made its position crystal clear with its MP Mark Patterson saying the caucus would vote "en masse" against the bill without the guarantee of a referendum.
"For us, this is a matter of absolute principle. This is one of our founding principles ... that these sort of conscience votes go to the people of New Zealand."
The position prompted visible frustration from Labour MP Louisa Wall who supports voluntary euthanasia but opposes a public vote on the matter.
She said it was "inconceivable" that NZ First would threaten to stop the legislation in its tracks unless it was put to a referendum.
"That is appalling and that is abhorrent," she said. "You're putting us all in an untenable situation."
Ms Wall pointed to the reported harm caused by recent plebiscites on same-sex marriage in Australia and Ireland.
"People essentially have the intensity of their lives debated in the public ... and when I think about who may be demonised by this process, for me, it is the vulnerable," she said.
"My principles will not let me vote for the referendum - even if it means the bill fails."
Staunch opponents of the legislation also argued against putting the vote to the public, with National MP Alfred Ngaro calling the move "irresponsible".
"If in your hearts you know that this Bill is not safe enough, do not unleash this onto our country and into our nation where it will ... do harm to our communities."
As late as this afternoon, some MPs were still undecided: Labour's Willie Jackson told the House it was the "hardest vote" he'd ever had to make.
"Right now, I'm not quite sure how I'm voting. I thought I did, but I'm still debating it in my mind," he said before the dinner break.
"Referendums don't treat minorities well ... At the same time, I don't want to be the one vote that stops it all."
In an another proposed amendment, opponents of the legislation failed in their bid to change the name of the legislation to the "Euthanasia and Assisted Suicide Act".
The End of Life Choice bill has had a long and often fractious passage through Parliament with both sides on occasion accusing the other of acting in bad faith.
The legislation has seen major changes since its introduction, with Mr Seymour significantly narrowing its scope and increasing safeguards in a bid to assuage critics' concerns.
How MPs voted on whether there should be a referendum on the End of Life Choice bill
YES - 63
National - Amy Adams, David Bennett, Paula Bennett, Chris Bishop, Judith Collins, Matt Doocey, Andrew Falloon, Nikki Kaye, Matt King, Barbara Kuriger, Mark Mitchell, Scott Simpson, Erica Stanford, Jian Yang, Lawrence Yule
Labour - Kiri Allan, Ginny Andersen, Jacinda Ardern, Liz Craig, Clare Curran, Kelvin Davis, Ruth Dyson, Paul Eagle, Kris Faafoi, Peeni Henare, Chris Hipkins, Raymond Huo, Iain Lees-Galloway, Andrew Little, Marja Lubeck, Jo Luxton, Kieran McAnulty, Stuart Nash, Greg O'Connor, David Parker, Willow-Jean Prime, Priyanca Radhakrishnan, Grant Robertson, Deborah Russell, Carmel Sepuloni, Jan Tinetti, Angie Warren-Clark, Duncan Webb, Megan Woods
Green Party - Marama Davidson, Julie Anne Genter, Golriz Ghahraman, Gareth Hughes, Jan Logie, Eugenie Sage, James Shaw, Chloe Swarbrick
NZ First - Darroch Ball, Shane Jones, Jenny Marcroft, Ron Mark, Tracey Martin, Clayton Mitchell, Mark Patterson, Winston Peters, Fletcher Tabuteau
ACT - David Seymour
Independent - Jami-Lee Ross
NO - 57
National - Kanwaljit Singh Bakshi, Maggie Barry, Andrew Bayly, Dan Bidois, Simon Bridges, Simeon Brown, Gerry Brownlee, David Carter, Jacqui Dean, Sarah Dowie, Paulo Garcia, Paul Goldsmith, Nathan Guy, Jo Hayes, Harete Hipango, Brett Hudson, Denise Lee, Melissa Lee, Agnes Loheni, Tim Macindoe, Todd McClay, Ian McKelvie, Todd Muller, Alfred Ngaro, Simon O'Connor, Parmjeet Parmar, Chris Penk, Maureen Pugh, Shane Reti, Alastair Scott, Nick Smith, Stuart Smith, Anne Tolley, Louise Upston, Tim van de Molen, Nicky Wagner, Hamish Walker, Nicola Willis, Michael Woodhouse, Jonathan Young
Labour - David Clark, Tamati Coffey, Willie Jackson, Anahila Kanongata'a-Suisuiki, Nanaia Mahuta, Trevor Mallard, Damien O'Connor, Adrian Rurawhe, Jenny Salesa, William Sio, Jamie Strange, Rino Tirikatene, Phil Twyford, Louisa Wall, Meka Whaitiri, Poto Williams, Michael Wood