TRENTON, N.J. (CBS/AP) — Gov. Phil Murphy on Friday signed legislation making New Jersey the seventh state to enact a law permitting terminally ill patients to seek life-ending medication. New Jersey will join six other states and the District of Columbia that have similar laws once it goes into effect in August.

Murphy, a Democrat, signed the Medical Aid in Dying for the Terminally Ill Act in private. His office would not answer why the signing was not public.

He earlier indicated he would support the bill, but in a personal statement, Murphy — a lifelong Catholic — revealed that he wrestled with whether to sign the legislation. The state’s Catholic Conference testified against the measure.

Groom Accused Of Sexually Assaulting Teen Waitress At Own Wedding Reception To Stand Trial

“I have concluded that, while my faith may lead me to a particular decision for myself, as a public official I cannot deny this alternative to those who may reach a different conclusion,” Murphy wrote. “I believe this choice is a personal one and, therefore, signing this legislation is the decision that best respects the freedom and humanity of all New Jersey residents.”

Under New Jersey’s law, only patients who are irreversibly terminally ill and have a prognosis of six months or less to live could acquire the medication to end their lives.

Lawmakers have tried since at least 2012 to advance the legislation.

“Allowing residents with terminal illnesses to make end-of-life choices for themselves is the right thing to do,” said Murphy. “By signing this bill today, we are providing terminally ill patients and their families with the humanity, dignity, and respect that they so richly deserve at the most difficult times any of us will face.”

The effort got some attention in New Jersey in 2014 when a 29-year-old California woman drew news coverage after she and her husband moved to Portland, Oregon, so she could use that state’s law to end her life on her own terms. Brittany Maynard, 29, was terminally ill with brain cancer.

Johnny Bobbitt Receives Multi-Year Drug Treatment Probation Sentence For Role In $400,000 GoFundMe Scam

Her husband, Dan Diaz, praised New Jersey on Friday, saying residents wouldn’t have to leave their homes “to secure the option of a gentle dying process.”

Oregon in 1997 was the first state to provide an end-of-life option. California’s law went into effect in 2016.

The New Jersey legislation includes measures that legislators called “safeguards.”

The law requires that two doctors sign off on the request, that the patient be deemed an adult resident of New Jersey, who can make such a decision and who voluntarily expresses a wish to die.

It requires patients to request the medication twice and says they must be given a chance to rescind the decision. At least one of the requests must be in writing and signed by two witnesses.

At least one witness cannot be a relative, entitled to any portion of the person’s estate, the owner of the health care facility where the patient is getting treatment or a worker there, or the patient’s doctor.

The New Jersey law lets only patients administer the drug to themselves, and his or her attending physician would be required to offer other treatment options, including palliative care.

Supporters say the new law lets qualified patients decide to end their own lives in a dignified manner.

Opponents, including the state’s Catholic Conference, argue that the measure hurts the most vulnerable in society and that the state should instead work to improve its health care system.

The measure passed the Democrat-led Assembly 41-33, with four abstentions. It cleared the Democrat-controlled Senate 21-16.

Evesham Township Citizens Bank Employee Arrested For Allegedly Recording Women Inside Work Bathroom

In addition to California and Oregon, Colorado, Hawaii, Vermont, Washington and the District of Columbia all have similar legislation. Montana does not have a law permitting medically assisted suicide for the terminally ill, but a 2009 state Supreme Court ruling determined that nothing in state law prevented a physician from prescribing such a drug to terminally ill person.

“By signing this bill today, we are providing terminally ill patients and their families with the humanity, dignity, and respect that they so richly deserve at the most difficult times any of us will face,” said Murphy.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)