Voluntary assisted dying laws have been formally approved by the West Australian parliament.
Western Australia has voted to legalise voluntary assisted dying, bringing to an emotional end a lengthy and often heated parliamentary debate.
MPs exchanged hugs and onlookers in the public gallery burst into applause as the lower house on Tuesday spent more than five hours approving the last of 55 amendments to the government's bill before rising.
It makes WA the second state after Victoria to legalise voluntary assisted dying.
WA is the second Australian state after Victoria to legalise voluntary assisted dying, with the scheme expected to be implemented in 18 months.
Health Minister Roger Cook, who oversaw the bill's introduction and was applauded by MPs on both sides for his handling of the process, choked back tears as he welcomed the passing of the legislation.
"We are at the end of a very long process, a momentous process for the West Australian parliament and West Australian public," he told the chamber.
"It's not a time for jubilation.
"Everyone knows what this legislation is about. It's about reflection. And to reflect that we've chosen compassion and the right to choose."
Premier Mark McGowan said it was a significant moment for the state.
“In this parliament, we have big hearts, and we are willing to take political risks to do the right thing,” he said.
“We should all be very proud of that.”
More than 180 hours were spent debating the legislation in parliament, mostly in the upper house where it was heavily amended.
Terminally ill adults in pain and likely to 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.
Much of the parliamentary debate was heated and emotional, with even Labor MPs critical of the government for its handling of the contentious legislation.
MPs were granted a conscience vote.
Readers seeking support and information about suicide can contact Lifeline 24 hours a day online and on 13 11 14. Other services include the Suicide Call Back Service on 1300 659 467, Beyond Blue and Kids Helpline (for people aged five to 25) on 1800 55 1800.
The Australian Centre for Grief and Bereavement can be contacted on 1800 642 066.