Voluntary assisted dying is set to be legalised in Western Australia after the government's legislation passed the upper house.
Legislative Council MPs on Thursday voted 24-11 in favour of the bill, bringing to an end several months of heated and emotional debate.
The upper house made more than 50 amendments during marathon debate of 184 clauses.
Those amendments will now need to be signed off in the lower house, which will be recalled for a special sitting next Tuesday.
That is considered to be a formality given the Labor government's control of the Legislative Assembly, paving the way for WA to become the second Australian state after Victoria to legalise voluntary assisted dying.
The scheme is expected to come into force in about 18 months' time.
"This is fantastic news," Premier Mark McGowan posted on Twitter.
"WA is now on the cusp of making history next week."
The third reading stage progressed quicker than anticipated with only 21 of the 36 MPs taking their final opportunity to address the legislation.
Former attorney-general Michael Mischin was among Liberal politicians who spoke out against the bill, saying he feared it lacked proper safeguards.
"I may very well, at some time, want to take advantage of the scheme if it is in place," he told the chamber.
"But my responsibility is more than just self-interest. I'm not persuaded the bill is anywhere near as good as it should be."
Liberal powerbroker Peter Collier lashed out at the premier, saying his "shrill" public commentary denigrating opponents of the bill was unbecoming of his position.
"It's an issue of life and death, and this piece of legislation deserves ruthless scrutiny," Mr Collier said.
Mr McGowan had pushed for the bill to pass before Christmas and been critical of staunch conservative Nick Goiran for holding up the debate.
"It got, I think, around 140 hours of debate in the upper house, which is unheard of," Mr McGowan told ABC radio.
Under the proposed laws, terminally ill adults who are in pain and likely have less than six months to live - or one year if they have a neurodegenerative condition - will be able to take a drug to end their lives if approved by two medical practitioners.
Doctors and nurses will be the only healthcare workers allowed to raise voluntary assisted dying with patients.
"It's about giving people that fundamental right to choose whether they want a painful, agonising death or not," Mr McGowan said.
Go Gentle Australia's WA campaign manager Joey Armenti said most of the amendments were grammatical and none would affect access to, or operation of, the bill.
Victoria passed similar laws in November 2017, which came into effect in June.
Lifeline 13 11 14
beyondblue 1300 22 4636