The Australian state of Victoria has become the first in the country to legalise assisted dying.
The legislation was passed after more than 100 hours of debate, including two all-night sittings.
The law means terminally ill patients in Victoria will have the right to request a lethal drug from the middle of 2019.
Patients must be aged at least 18 and have less than six months to live. However, patients with some conditions - such as multiple sclerosis and as motor neurone disease - will become eligible when they have 12 months to live.
State Premier Daniel Andrews said: “I’m proud today that we have put compassion right at the centre of our parliamentary and our political process. That is politics at its best and it is Victoria doing what it does best - leading our nation.”
The law, which is designed for patients in severe pain, has 68 safeguards. These include a requirement that a patient must make three requests to specially trained doctors in order to end their life, with a special board also set to be created which will review all cases.
Coercion of patients into ending their life will be a crime, while patients must have lived in Victoria for at least 12 months and be of sound mind.
The bill was opposed by some state lawmakers, who had attempted to add hundreds of amendments.
Laws allowing terminally ill patients to legally end their lives with a doctor’s supervision have been passed in countries including Canada, the Netherlands and Belgium.