New Jersey Governor Phil Murphy announced his plan to sign legislation allowing terminally ill patients to seek life-ending medication. Once the bill is signed, New Jersey will join six other states and the District of Columbia that have similar laws, the Associated Press reports.

"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 Democrat-led Assembly and Senate passed the measure in close votes on Monday.

The bill would allow adult New Jersey residents with a prognosis of six months or less to live to request life-ending medications, according to the AP. The legislation includes several "safeguards" to reduce the chances of abuse, such as requiring patients to make two separate requests to their doctors, along with a chance to rescind the request.

Get Breaking News Delivered to Your Inbox

Lawmakers in the state have tried to advance the legislation since 2012. The Aid in Dying for the Terminally Ill Act, which would allow physicians to prescribe life-ending drugs to terminally ill patients who request it, was back in the spotlight in 2014. At the time, the New Jersey State Assembly passed the bill, but Governor Chris Christie said he would veto it.

The bill was introduced by Assemblyman John Burzichelli, after his sister, Claudia Burzichelli, died of lung cancer in 2013.

The issue of aid in dying gained wider nationwide attention in 2014 when 29-year-old Brittany Maynard, who was suffering from a brain tumor, went public with her story about seeking to end her life with drugs prescribed by her doctor in Oregon, where it was legal.

Since Maynard's death, her family members have continued her campaign to expand legal rights for terminally ill patients to end their lives on their own terms.

In his statement Monday, Governor Murphy said the "measure is about dignity," and he commended the co-sponsors of the bill. He also acknowledged that the law was a personal five-year fight for Burzichelli and that it "will make us a more dignified and empathetic state."