SACRAMENTO — The California Senate on Thursday cleared the way for a landmark “right to die” law allowing competent adults with a terminal illness to seek a medication from a doctor to end their lives.

After an impassioned debate filled with tales of personal loss in a hushed Senate chamber, the controversial End of Life Option Act won wide approval, passing 23 to 14.

“We count today’s vote as a historic step forward,” said Sen. Bill Monning, D-Monterey, co-sponsor of SB 128. “We hear a lot of different tough issues being debated, but I can’t remember an issue that commanded greater attention.”

The Senate vote was split along party lines, with all Republicans opposed and all Democrats who were present — with the exception of Tony Mendoza, D-Artesia — voting in support.

Proponents are confident the measure will be approved by the overwhelmingly Democratic Assembly. Then it will go to Gov. Jerry Brown, a former Jesuit seminarian who has not indicated whether he will sign it.

The Golden State has spurned previous attempts to pass similar laws, at both the ballot box and through the Legislature. If it becomes law, California would join three other states with physician-assisted death laws: Oregon, Vermont and Washington. Court rulings in New Mexico and Montana also allow the practice.

Inspired by an East Bay woman’s highly publicized quest to end her grueling battle with cancer, lawmakers sought to allow California’s terminally ill people greater choice over how and when they die.

The vote was watched in the Senate chamber by the family of 29-year-old Brittany Maynard, a UC Berkeley graduate and newlywed diagnosed with aggressive terminal brain cancer. She could not receive physician-prescribed medications to end her life last year at her Alamo home, so she and her husband moved to Portland, Oregon, to take advantage of the state’s Death with Dignity law.

Brown’s spokesman, Evan Westrup, confirmed late Thursday that the governor had called Maynard before she died. But Westrup declined to reveal any details of the conversation.

In the final weeks of her life, Maynard partnered with the national nonprofit group Compassion & Choices to launch a campaign in California to legalize “aid in dying.”

“The Senate vote is an affirmation of what Brittany started,” said Dan Diaz, Maynard’s widower. “It reaffirms that she was simply doing what anyone in her predicament would do, which is want to be in control of their own dying process.”

The bill now heads to the Assembly Health Committee. If advanced, it will be heard by the Judiciary and Appropriations committees before moving to the Assembly floor. With the governor’s approval, the law would take effect Jan. 1.

Asked if she fears Brown’s veto pen, Deborah Lynn Ziegler, Maynard’s mother, said: “I believe that he is a kind and thoughtful man, and I think he will struggle with this. I have faith that he will listen to the population of California.”

The measure is modeled after Oregon’s law, with two key differences. It requires a translator for non-English speakers. And pharmacists, not just physicians, are given legal immunity for helping people die.

Oregon’s 17 years of experience with the law shows it is rarely used and has not triggered any legal disputes. Since the Oregon law went into effect in 1997, 1,327 people have requested prescriptions, but 35 percent have not used them.

Maynard’s wrenching case triggered a shift in the debate, said Monning and the other co-author, Sen. Lois Wolk, D-Davis.

Maynard’s video — explaining why she was making use of Oregon’s law — has been watched by more than 11.7 million people on YouTube.

The campaign to pass the legislation was also buoyed in May by the decision of the politically influential California Medical Association to drop its long-held opposition to death-with-dignity legislation.

Wolk was also affected by the traumatic cancer death of her mother, a Philadelphia social worker, when Wolk was 17. “Her suffering was prolonged and unbearable,” she told her Senate colleagues.

But opponents faulted the measure for failing to deal with what they believe is the core issue: the need for better health care for more people. They warned that it will place pressure on sick patients without financial resources to take a quick way out. They also argued that doctors cannot reliably predict when a person has only six months to live.

“What kind of society are we? I don’t believe we are in a disposable one, when it comes to shortcutting the natural course of life,” said Sen. John Moorlach, R-Costa Mesa.

“Patients at end of life need care, not tools to take their life,” said Sen. Mike Morrell, R-Rancho Cucamonga. “We are sending a signal that suicide is OK.”

Sen. Sharon Runner, R-Lancaster, said that before she got a double lung transplant she had thought about giving up during her two months in an intensive care unit.

“You are not making good decisions when you are in pain and medicated,” she said. “I considered it and didn’t do it, but look at the life I have now.”

Choking back tears, Sen. Joel Anderson, R-San Diego, said: “I was disabled for a number of years and couldn’t provide for my family. … You bet I thought about suicide.

“I don’t want to strip people of hope. … Let’s not sponsor death on this floor.”

But Sen. Cathleen Galgiani, D-Stockton, who once worked in hospital intensive care units, disagreed. “We have science to prolong life,” she said. “Now we have the gift of science that allows the gift of ending suffering.”

Contact Lisa M. Krieger at 650-492-4098. Follow her at Twitter.com/lisamkrieger.