New Jersey Gov. Phil Murphy said he plans to sign into law a bill enabling terminally ill people to seek medical assistance to end their lives, reportedly making the Garden State the eighth jurisdiction to have such a law.

The state legislature approved The Medical Aid in Dying for the Terminally Ill Act on Monday.

“Allowing terminally ill and dying residents the dignity to make end-of-life decisions according to their own consciences is the right thing to do,” Murphy said in a statement. “I look forward to signing this legislation into law.”

The state legislature has been considering such bills since 2012 but never sent one to the governor before. Under the latest bill, any terminally ill adult state resident who has the capacity to make healthcare decisions would be able to obtain medication to self-administer to end his or her own life.

The legislation details many restrictions and parameters, including that qualifying people would be required to make two oral requests and one written request to the attending physician for the medication. The written request would need to be witnessed by at least two others, at least one of whom could not be a relative, an heir or the owner, operator or employee of a healthcare facility, other than a long-term care facility, where the person is receiving medical treatment or is a resident. The person’s attending physician could not be a witness.

A patient’s request for, or the provision of, medication in compliance with the bill would not constitute abuse or neglect of an elderly person and could not be used as the sole basis for the appointment of a guardian or conservator. Anyone altering or forging a request for medication with the intent or effect of causing someone’s death could face five to 10 years in prison and a fine of up to $150,000.

Anyone acting in compliance with the bill, if it is signed into law, would be immune from civil and criminal liability, professional disciplinary action, and censure, discipline, and suspension or loss of license, but “nothing in the bill is to be construed to authorize a physician or other person to end a patient’s life by lethal injection, active euthanasia, or mercy killing,” the state said.

Any medication prescribed under the bill that the patient chooses not to self-administer is required to be disposed of according to the law.

California, Colorado, Hawaii, Oregon, Washington and Vermont, as well as Washington, D.C., have similar laws.