Image copyright Getty Images Image caption Prime Minister Jacinda Ardern supports euthanasia reform

New Zealand's parliament has voted in favour of legalising euthanasia, paving the way for a national referendum on the issue next year.

The law would allow terminally ill people with less than six months to live the opportunity to choose assisted dying if approved by two doctors.

The bill was passed with a vote of 69-51, ending years of heated parliamentary debate on the topic.

Prime Minister Jacinda Ardern has supported calls for euthanasia reform.

A recent poll suggested 72% of New Zealanders supported some form of assisted dying.

What's in the bill?

Since 2017, there have been eight parliamentary debates and a record 39,000 submissions from the public on David Seymour's End of Life Choice Bill.

There have been some alterations to the legislation.

Media playback is unsupported on your device Media caption Richard Selley spoke to the BBC about his decision to end his life

It now only covers those diagnosed with less than six months to live, while it previously included severe and incurable conditions.

Another major alteration to secure its passing was the addition of the requirement of a referendum.

This was a demand of the populist New Zealand First Party, which threatened to vote against the legislation if it wasn't put to the public.

"New Zealanders elect us. But they do not elect our consciences," said New Zealand First MP Tracey Martin.

While there is widespread support for euthanasia reform, there has also been vocal opposition.

As MPs voted, protesters carried placards stating "assist us to live not die" and "euthanasia is not the solution" outside parliament.

The people of New Zealand will vote on the bill in a referendum in conjunction with the country's 2020 election. A second referendum question, about recreational cannabis, will also be on the ballot paper.