Right to assisted dying established for patients with conditions assessed as incurable and causing unbearable pain, The Guardian reports.

Legislation granting incurably ill adults the right to assisted dying has been formally adopted in France after the text was approved by the country’s highest constitutional authority and published in the official journal.

France joined the small group of countries including the Netherlands, Belgium, Switzerland, and Canada to have legalized the practice.

Published on Wednesday after years of debate, it establishes a right to assisted dying for patients of legal age who are French nationals or long-term residents and suffering from conditions that are assessed as incurable and are causing unbearable pain.

A doctor must verify the patient’s eligibility before a panel assesses whether the criteria have been met. Once approval has been granted, patients must wait at least two days before the procedure can take place and confirm their decision on the day.

The patient may withdraw consent at any time and must administer the lethal substance themselves unless they are physically unable to do so, in which case a healthcare worker can help.

Until now France has allowed passive euthanasia–such as withholding artificial life support–and deep sedation before death, but people seeking active end-of-life options have been forced to travel to other countries where assisted dying is legal.