SYDNEY (Reuters) - The parliament of Australia’s second largest state passed legislation on Friday to allow terminally ill patients to seek medical help to end their lives, a bill that is expected to act as a catalyst for the rest of the country to adopt similar laws.

Members of parliament from the Australian state of Victoria participate in a marathon sitting to discuss a euthanasia bill in Melbourne, Australia, October 20, 2017. AAP/Julian Smith/via REUTERS

Any resident of Victoria state over 18, with a terminal illness and with less than 12 months to live can request a lethal dose of medication, the bill permits. Anyone that is too ill to administer the dosage can ask for a doctor to help.

Many countries have legalized euthanasia or physician-assisted deaths, including Canada, the Netherlands, Switzerland, and some states in the United States.

But Australia’s federal government has opposed legalizing euthanasia even though the remote Northern Territory became the first jurisdiction in the world to do so in 1995.

The federal government enacted its own legislation to override the Northern Territory law in 1997 under rules allowed by the constitution. State law can not be overridden.

The passage of the bill in Victoria is expected to herald assisted death legislation in other Australian states.

“It is a landmark moment. Other states are likely to follow. We have seen this in other jurisdictions and I expect once politicians see how the system works, they will adopt similar models,” said Ben White, director of the Australian Centre for Health Law Research at Queensland University of Technology.

The issue has divided lawmakers and medicinal professionals.

Victorian premier Daniel Andrews introduced the bill following his father’s death from cancer in 2016.

An opponent of the legalization, Michael Gannon, president of the Australian Medical Association, which represents medical practitioners, said state law should not change because of the death of Andrews’ father. He later apologized for the comment.

Members of the state assembly debated the emotive bill through the night in a 26-hour session that ended with approval by 47 votes to 37.

The legislation needs the approval of Victoria’s senate, though analysts expect it to pass into law.

The legislation will not come into effect for 18 months to allow time to properly implement the assisted dying scheme.