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 doctor's care.

The state Senate passed the measure on a 23 to 14 vote 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.

Dozens of states have considered right-to-die legislation this year.

Such a bill failed in California in 2007 over objections from Catholic and medical groups.

The year's bill, SB128, from Democratic Sens. Bill Monning of Carmel and Lois Wolk of Davis, would protect physicians from prosecution if they give terminally ill adults the option of medical aid in their deaths.

The plan, which has received support from Maynard's family, would be limited to mentally competent patients with less than six months to live. It also would require that they take the deadly medication themselves, without help from a physician.

His bill is modeled from Oregon's law, which was approved by voters in 1994. State records show more than 750 people have used the law to end their lives.

The Senate debate drew emotional testimony from each side.

Sen. Holly Mitchell, D-Los Angeles, 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, and gives me access to make a personal choice if I so choose," she added.

Sen. Jeff Stone, R-Temecula, said he worries California could become known for death tourism.

"What is going to be the new theme of the state of California?" Stone said. "Come play, live and die in California."