(Reuters) - Hawaii would become the seventh U.S. state to legalize physician-assisted suicide for terminally ill patients under legislation passed by the state Senate on Thursday and sent to the governor.

The bill would allow terminally ill individuals to obtain a doctor’s prescription for medication to hasten their death so long as two physicians agree the patient has no more than six months to live and is mentally competent.

The measure also would require a patient seeking life-ending medical aid to undergo a mental health evaluation, to present two separate requests to an attending physician and for two witnesses to attest to the patient’s wish to die.

While a doctor could dispense the medication, patients would be required to take it on their own.

The bill is due to be automatically enacted on April 17 unless Governor David Ige signs it into law before then or vetoes it.

The advocacy group Compassion and Choices, which backed and lobbied for the measure, said Ige, a Democrat, is expected to sign the bill.

The measure was approved by the Hawaii House of Representatives on a 39-12 vote on March 6, and cleared the Senate on a vote of 23-2. Democrats hold a majority in both bodies.

Six other states - California, Colorado, Montana, Oregon, Vermont and Washington - already have laws on the books to legalize medical aid in dying for terminally ill patients, terminology preferred by advocates to the phrase “physician-assisted suicide.”

The District of Columbia also has enacted such a statute.

Supporters have sought to widen legalization of the practice as a way to help end-stage cancer and other patients with incurable diseases to die with less pain and suffering.

Opponents have included some religious groups and some advocates for the elderly and disabled who have argued that unscrupulous caregivers or relatives could pressure vulnerable patients to take their own lives.

Oregon was the first to legalize physician-assisted suicide with a statute that took effect in 1998. Since then, some 200 end-of-life prescriptions have been written a year and about two-thirds of them being used, according to Aubrey Hawk, a spokeswoman for Compassion and Choices.