SAN DIEGO (AP) — A California judge on Friday rejected a request by physicians to immediately suspend a new state law allowing terminally ill people to end their lives.

Riverside County Superior Court Judge Daniel A. Ottolia said the law will remain in effect for now. He also agreed to allow the physicians to pursue their lawsuit claiming the law lacks safeguards to protect against abuse.

READ MORE: Ceres Man Pleads Guilty To Operating International Cockfighting Breeding Farm

The law took effect June 9 and allows terminally ill adults to obtain a prescription for life-ending drugs if a doctor has determined they have six months or less to live.

Advocates argued that terminally ill people could face prolonged, painful deaths if the law is suspended.

Elizabeth Wallner, a Sacramento resident with stage IV colon cancer who attended the hearing, said she cried with relief when the judge denied the motion to suspend the law.

“I want to have the ability to control the end of life and protect my child from watching me be tortured to death,” she said. “It just gave me an immeasurable sense of peace.”

READ MORE: King Tides: Coastal Flood Advisory Issued For San Francisco Bay Shoreline This Weekend

California is one of five states in which terminally ill people can end their lives. Oregon was the first to provide the option in 1997.

The California law is being challenged by the Life Legal Defense Foundation, American Academy of Medical Ethics and several physicians.

Opponents of the law say hastening death is morally wrong, puts patients at risk for coerced death by loved ones, and could become a way out for people who are uninsured or fearful of high medical bills.

The state attorney general’s office countered that medical professionals can refuse to prescribe and dispense the drugs. The law also specifies that the terminally ill person must be able to self-administer the drugs.

Both sides are due back in court Dec. 5.

MORE NEWS: Smash-And-Grab Thieves Hit San Jose Eastridge Mall Jewelry Store; 5 Sought

© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.