SACRAMENTO, Calif. — California lawmakers advanced a right-to-die bill Thursday, giving hope to those who want the nation’s most populous state to allow terminally ill patients to end their lives under a doctor’s care.

The state Senate passed the measure 23 to 14, sending it to the Assembly with a vote that marked progress for advocates seeking to expand aid-in-dying laws beyond a small group of states.

The issue gained traction nationally after 29-year-old Brittany Maynard moved from California to Oregon to end her life in November. Maynard was dying of brain cancer and documented her final weeks in widely viewed videos posted online.

She said in the clips, and in the nationally televised interviews they prompted, that she should have been legally allowed to get doctor-prescribed lethal drugs in California.

Maynard’s family and her supporters have seized the attention to push their cause, and dozens of states have considered such measures this year.

Opposition, however, has been fierce.

Critics, including the Catholic Church, have called the practice “assisted suicide” and say it goes against the will of God. Others have said they worry that terminally ill patients would feel pressured to end their lives to avoid burdening their families.

The measures have stalled in several states, and they’ve yet to receive an initial hearing in many others.

Advocates see California, home to nearly 39 million people, as their best chance this year to expand aid-in-dying laws beyond Montana, Oregon, Washington state and Vermont.

Maynard’s mother, Deborah Ziegler, and husband, Dan Diaz, watched the Senate vote in Sacramento. “The Senate vote is an affirmation of what Brittany started,” Diaz said.

The debate triggered emotional testimony from each side.

Sen. Holly Mitchell supported the plan, saying the bill “will not force me, if it is not my religious, cultural, ethical belief to do this. It gives me the right … to make a personal choice.”