New Zealand is to become the first country in the world to put euthanasia to a binding public vote after its lawmakers passed a bill laying out what the country’s assisted dying regime would be.

The law, which would allow terminally ill people with less than six months to live to choose assisted dying if approved by two doctors, passed its final reading in parliament in the capital, Wellington, on Wednesday by 69 votes to 51. It was a conscience vote, meaning that most lawmakers did not vote along party lines.

But after two years of debate as it progressed through parliament, the fate of the law is still uncertain; it will come into effect only if the people of New Zealand approve it in a referendum at the country’s 2020 election. A second referendum question, about recreational cannabis, will also be on the ballot paper – in what will also be the first time that a nation has put the issue to a binding public vote.

Euthanasia and assisted dying rates are soaring. But where are they legal? Read more

A third public vote, on decriminalising abortion – a matter parliament is considering – has not been ruled out.

While a recent poll shows New Zealanders supported some form of assisted dying regime – 72% of people surveyed in a 1 News Colmar Brunton poll in July were in favour – opposition has been vocal. A record 39,000 public submissions were made while lawmakers were considering the matter, with 90% of submitters opposed to it.

New Zealand’s parliamentarians have attempted to pass assisted dying laws twice before without success. So many lawmakers wanted to give speeches about the bill on Wednesday that debate stretched into the evening.

“I stand here and say to all of you that we can do better as a nation, we are a compassionate nation,” said Nikki Kaye, from the opposition National party. “We need to pass this bill in the interests of fairness and justice.”

She noted that the bill had become “incredibly narrow” on its passage through parliament.

Patients will be blocked from accessing euthanasia for reasons of age, disability, or mental illness, they cannot make written consent to it in advance, and it cannot be suggested to them by doctors.

Others said the safeguards were not enough. Adrian Rurawhe, from the governing Labour party, said views of New Zealand’s indigenous Māori had not been properly ascertained.

“It will disadvantage Māori further in a system that already disadvantages Māori,” he said, referencing the major health and other inequities that Māori people face.

Maggie Barry, a National party lawmaker who has been a vocal opponent of the law, said supporters of it had been “dismissive and rude” to people with disabilities. “They’ve been told they’re too expensive to keep alive,” she said.

But the prospect of a public vote, and concerns about the tone of the debate, preoccupied lawmakers as much as the ethics of euthanasia did.

David Seymour, the bill’s sponsor and sole member of parliament for the Act party, said New Zealanders’ “life experience” qualified them to make the decision and rejected suggestions that lawmakers had abdicated their responsibility by turning it over to the public.

Both euthanasia and cannabis will be put to referendum questions because minor political parties made their votes for the laws conditional on public votes being held.

Lawmakers from New Zealand First, a populist party that holds the balance of power in New Zealand’s government, threw their support behind the euthanasia bill in exchange for a referendum. Tracey Martin, one of the party’s MPs, said voters had elected parties based on their manifestos – not their consciences – and it would be wrong for parliament to decide the matter.

“This is an important moment for the New Zealand public,” she said. “They have never had a power like this, I believe, in their lifetime. This is incredibly serious.”

Others called for respect and civility in the public debate. Unlike in other controversial referendums of recent years – such as the 2016 Brexit vote – there will be no doubt about the law New Zealanders are voting for; they will be asked whether or not they support the end of life choice bill as passed by parliamentarians on Wednesday.

But such is the potential for incorrect or malicious information skewing the debate that New Zealand’s justice ministry plans to convene a special team to combat “misinformation and manipulation” in the lead-up to the election, Radio New Zealand reported.

It is the first time public servants in New Zealand will be asked to play such a role.

Holding two referendums at the same time as an election would probably boost voter turnout, said Jonathan Boston, a professor of public policy at Victoria University, Wellington. But he did not believe moral issues should be a matter for public vote.

“If you’ve got really quite controversial issues being determined by referenda at the time of a general election, there’s a risk this will take attention away from important election issues, with the referenda issues dominating the debate,” he said.