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

The state Senate passed the measure on a 23 to 14 vote Thursday, ahead of a legislative deadline.

The issue gained traction nationally after 29-year-old Brittany Maynard moved from California to Oregon to end her life in November.

Oregon allows doctors to prescribe suicide drugs to certain consenting patients.

Maynard recorded her final days in widely viewed online videos that included support for right-to-die laws.

Opponents of such legislation in California and elsewhere say suicide is against God’s will and that some patients may feel pressured to kill themselves so they don’t burden family members.

The measure heads to the Assembly.

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)