Last Updated Sep 12, 2015 9:59 AM EDT
SACRAMENTO, Calif. -- California lawmakers gave final approval Friday to a bill that would allow terminally ill patients to legally end their lives.
The measure faces an uncertain future with Gov. Jerry Brown, a former Jesuit seminarian who has not said whether he will sign it.
Senators approved the bill on a 23-14 vote after an emotional debate on the final day of the legislative session.
"Eliminate the needless pain and the long suffering of those who are dying," urged Sen. Lois Wolk, D-Davis, one of the bill's co-authors.
Opponents said the measure could prompt premature suicides.
"I'm not going to push the old or the weak out of this world, and I think that could be the unintended consequence of this legislation," said Sen. Ted Gaines, R-Roseville.
The measure to allow doctors to prescribe life-ending medication succeeded on its second attempt after the heavily publicized case of Brittany Maynard. The 29-year-old California woman with brain cancer moved to Oregon to legally take her life.
Her relatives tearfully watched the debate from the Senate floor, while supporters lined the Senate balcony.
"How dare the government make decisions or limit options for terminally-ill people like me?" Maynard said in a video posted to YouTube before her death on Nov. 1, 2014.
"She was simply saying, it's ridiculous that we have to leave home, drive 600 miles north in the middle of her being told that she's dying of a brain tumor," Maynard's husband, Dan Diaz, told CBS News. "Nobody should have to do that."
Diaz made a promise to Maynard weeks before she died: to fight so nobody else has to go through what she went through and to try and pass legislation. He gave up his job to work with the right-to-die advocacy group Compassion and Choices.
"I am keeping my promise for Brittany and fulfilling that promise, but it certainly is bittersweet," he said.
Diaz said for him, this doesn't stop in California. He would like to see this option available for terminally ill patients across the country.
A previous version passed the Senate but stalled in the Assembly until lawmakers there took it up in a special legislative session. The move to bypass the usual process drew criticism from the governor.
The revised measure includes requirements that the patient be physically capable of taking the medication themselves, that two doctors approve it, that the patient submit several written requests, and that there be two witnesses.
Doctors in Oregon, Washington, Vermont and Montana already can prescribe life-ending drugs.