New Jersey Democratic Gov. Phil Murphy said Monday he will sign legislation already approved by the state legislature to allow terminally ill patients to legally end their lives.

The Democrat-led state Assembly and Senate passed the “Aid in Dying for the Terminally Ill Act” on Monday that permits adult patients with six months or less to live to obtain and self-administer life-ending medication.

“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. I look forward to signing this legislation into law,” Murphy, a Democrat, said in a statement after the Democrat-led Assembly and Senate passed the measure in close votes.

NJ CLEARS 1ST HURDLE TO MAKE ASSISTED SUICIDE LEGAL; OPPOSITION CALLS HEARING A 'CHARADE'

There is no good reason for them to be forced to prolong their pain and suffering

— Democratic state Sen. Nicholas Scutari, a supporter of the "Aid in Dying for the Terminally Ill Act"

Lawmakers have tried unsuccessfully since at least 2012 to advance the legislation. The bill got some attention in New Jersey in 2014 around the time that 29-year-old Brittany Maynard, who was terminally ill with brain cancer, was in the national spotlight.

Before her death, Maynard moved from California to Oregon with her husband where the “Death with Dignity Act” allowed her to legally take medication to die. On Nov. 1, 2014, Maynard elected to take lethal drugs to end her life instead of fighting a progressive form of brain cancer in which patients on average survive just 14 months.

This time around, New Jersey's assisted suicide bill passed in the Assembly, 41-33, with four abstentions, and in the Senate, 21-16.

NJ TO ALLOCATE $2.1M IN AID FOR ILLEGAL IMMIGRANTS FACING DEPORTATION, GOVERNOR SAYS

The Aid in Dying for the Terminally Ill Act has “safeguards” in place to prevent abuse, including requiring patients to submit two requests for the life-ending medication and giving patients the option to rescind the requests.

Supporters hail its passage as a victory in the so-called "right to die" movement, arguing the legislation gives terminally ill patients the chance to end their lives in dignity.

"There is no good reason for them to be forced to prolong their pain and suffering or to prolong the grief of their loved ones if they make that choice," Democratic state Sen. Nicholas Scutari said in a statement.

Those in opposition to the New Jersey legislation believe it fails to protect the most vulnerable members of society and want the state to put more effort into improving its health care system.

The New Jersey Catholic Conference argued insurance companies in the states that approved assisted suicide legislation deny individuals healthcare coverage and instead offer them an inexpensive drug to end their lives.

CLICK HERE TO GET THE FOX NEWS APP

“In an era of cost control and managed care, patients with lingering illnesses may be branded as a financial liability for the insurance company, and decisions to encourage death could be driven by reducing costs,” the Catholic organization said in a statement to Fox News.

California, Colorado, Hawaii, Oregon, Vermont, Washington state and D.C. all have similar legislation.

Fox News’ Frank Miles and The Associated Press contributed to this report.