The law means that terminally ill patients who meet strict guidelines could end their lives with medical assistance. Two doctors are required to assess the patient's state and one has to have a diploma in psychological medicine.
Voluntary euthanasia is technically illegal in the Netherlands, but authorities have issued guidelines under which prosecutions will not be mounted. In Oregon in the United States, a law enacted by referendum is on hold pending legal challenge.
The Rights of the Terminally Ill Bill was passed by 15 votes to 10 in the Northern Territory's parliament after its sponsor, Marshall Perron, the Chief Minister, resigned to smooth its passage.
Mr Perron, whose mother died an agonising death last year, said the bill's passage was the highlight of his career and he hoped other Australian states would follow suit. Australia's federal Attorney General, Michael Lavarch, said other states might now look at adopting voluntary euthanasia. But anti-euthanasia activists said it was one of the most tragic days in Australian history.