The Senate has defeated a push to give the ACT and Northern Territory the right to legislate on euthanasia.
The Northern Territory and ACT remain banned from making assisted suicide laws with legislation shot down in the Senate.
The upper house voted 36-34 in favour of dumping a bill to repeal a 1997 ban on territories' rights to legislate on euthanasia on Wednesday after two days of emotional debate.
Crossbench senator David Leyonhjelm was confident his private legislation would pass right up until the vote but his hopes were dashed late.
The bill's defeat means Prime Minister Malcolm Turnbull avoids a potentially divisive stoush on whether it would be voted on in the lower house.
Senator Leyonhjelm said public opinion was in favour of legalising voluntary euthanasia.
"The fact we don't have assisted suicide in this country shows a serious flaw in our democracy," he told parliament.
He declared the time had come for the NT and the ACT to be given the same legislative rights as states but the majority of senators disagreed.
With the major parties given a conscience vote on the issue, cabinet ministers were divided.
Government senate leader Mathias Cormann made his case against assisted suicide, while NT-based Indigenous Affairs Minister Nigel Scullion said territories should be allowed to decide.
"I will vote no both as a matter of deep personal conviction and faith," Senator Cormann said.
Deputy Nationals leader Bridget McKenzie and Resources Minister Matt Canavan spoke against the bill.
That was in contrast to Education Minister Simon Birmingham and Defence Minister Marise Payne, with both supporting Senator Leyonhjelm's push.
Labor senator Pat Dodson said allowing voluntary euthanasia would make indigenous people more vulnerable.
"Where First Nations people are already over-represented at every stage of our health system, it is irresponsible to vote in favour of another avenue to death," he told parliament.
His party room colleagues Don Farrell, Helen Polley, Chris Ketter, Jacinta Collins and Deborah O'Neill also voted against it.
Throughout the two-day debate, senators remembered deaths of terminally ill loved ones late.
Greens senator Nick McKim said his father died by euthanasia in a Tasmanian palliative care ward last year.
The Nationals' John Williams also recalled his father's death but remained steadfast in his opposition to assisted suicide.
One Nation's Peter Georgiou said with a heavy heart he couldn't support the bill despite his own heartbreaking watching his fiancee die from rare cancer 15 years ago.