Compassion & Choices, Associated Press
This undated file photo provided by Compassion & Choices shows Brittany Maynard, a terminally ill woman who decided to end her life early under an Oregon law. She died Nov. 1, 2014.

SAN FRANCISCO — A group of cancer patients and doctors filed a lawsuit Wednesday seeking to exempt physicians who help terminally ill patients end their lives from a California ban on assisted suicide.

Physicians who provide such assistance are not helping the patient commit suicide, but instead giving them the option of bringing about a peaceful death, the lawsuit filed in San Francisco Superior Court states.

The plaintiffs cite the case of Brittany Maynard — a young California woman with brain cancer who moved to Oregon to legally end her life with the help of doctors.

Maynard's family is not involved in the suit.

Opponents say prescribing life-ending medication violates a doctor's oath to do no harm. They also fear some sick patients would feel pressured to end their lives.

Maynard, a 29-year-old San Francisco Bay Area resident, had made her case public with online videos viewed tens of millions of times saying she should have been able to legally obtain life-ending drugs in California.

Advocates for aid-in-dying laws say Maynard's story has recharged legislative efforts across the nation, including in Pennsylvania, Wyoming, Washington, D.C., and California, where a bill supported by Maynard's mother was recently introduced. Similar bills are also being considered in New York and Colorado.

Five states allow patients to seek aid in dying — Oregon, Washington, Montana, Vermont and New Mexico.

Kathryn Tucker, an attorney for the plaintiffs in the California lawsuit, worked on similar lawsuits that established aid-in-dying in Montana and New Mexico.

The California lawsuit, which names state Attorney General Kamala Harris as a defendant, says a ban on physician-assisted death would violate the state constitution's guarantee of privacy, equal protection, due process and freedom of speech.

The plaintiffs include five doctors and two cancer patients.