In a landmark judgment, Canada’s Supreme Court on Friday struck down laws prohibiting doctor-assisted suicide for patients with “grievous and irremediable medical conditions,” ruling that doctors may now help such patients to end their lives through medications.

In a unanimous decision, the country’s top court ruled that the ban, which has been in place for over two decades, infringed upon the “right to life, liberty and security of the person in a manner that is not in accordance with the principles of fundamental justice.”

In its judgment, the court wrote that it did not agree that the “existential formulation of the right to life requires an absolute prohibition on assistance in dying, or that individuals cannot ‘waive’ their right to life,” adding that such a prohibitive law creates a “duty to live” rather than a “right to life.”

The judgment comes just six months after the Canadian Medical Association (CMA) revised its policy in favor of physician-assisted euthanasia. In an interview to CBC News following the court verdict, CMA President Chris Simpson welcomed the decision.

“What we want to do is really make sure patients who are eligible under the new rules have access to this therapeutic service, but at the same time we need to be very careful that physicians have the right to conscientious objection for moral or ethical reasons or religious reasons,” Simpson reportedly said.

However, the Supreme Court decision, which makes Canada one of just a handful of countries permitting physician-assisted dying, was criticized by several disability-rights groups in the country, who felt the judgment was too open-ended, according to media reports.

“What they (patients) need is policies and procedures and supports from government and from others. They don’t need an option to kill themselves,” Marie Ryan, former chairperson of the Council of Canadians with Disabilities, reportedly said.

Reacting to the judgment, the Canadian government said, in a statement released Friday, that it needs time to study the deeply “sensitive issue” to ensure that “all perspectives on this difficult issue are heard.”

The government will now have a year to rewrite the current law to conform to the judgment. Until then, the current legislation and prohibition will remain in place.