A New Jersey law which will allow terminally ill patients to legally end their lives will go into effect on Thursday in the state.

The Aid in Dying for the Terminally Ill Act permits adult patients with six months or less to live to obtain and self-administer life-ending medication. Democratic Gov. Phil Murphy signed the bill into law on April 12 after the Democrat-led Assembly and Senate passed the measure in close votes.

MAINE IS 8TH STATE TO LEGALIZE ASSISTED SUICIDE

“Allowing residents with terminal illnesses to make end-of-life choices for themselves is the right thing to do,” Murphy said in an April 12 press release upon signing the bill.

Supporters hail its passage as a victory in the so-called "right to die" movement. Those in opposition say 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 law mandates a psychiatrist or psychologist first assess whether a person has the mental capacity to decide to end their own life, the Washington Examiner reported. A physician can then legally prescribe the drug to their terminally ill patients who can administer the drug themselves.

CLICK HERE TO GET THE FOX NEWS APP

The 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.

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