Roughly two years later the End of Life Option Act went into effect in the state of California, a state judge overturned the law, declaring it unconstitutional.

The Act enabled terminally ill patients to utilize medical aid in dying as a palliative care option to end suffering and peacefully end their lives. Six other states—Colorado, Montana, Oregon, Vermont, Washington and Hawaii, as well as the District of Columbia—have authorized similar medical aid in dying.

Riverside County Superior Court Judge Daniel A. Ottolia on Tuesday ruled that the legislature violated the state constitution by passing it during a special session limited to health care issues. The state attorney was given five days to file an emergency appeal before the ruling will take effect.

“Overturning the End of Life Option Act would have devastating consequences for terminally ill Californians, who will be forced to suffer through needlessly prolonged deaths, and their families,” Kevin Díaz, national director of legal advocacy for Compassion & Choices, said in a statement. “While we respect the plaintiffs’ personal opposition to the law, they certainly should not be able to take away the ability of other doctors to offer this option to dying patients to peacefully end their suffering.”

Compassion & Choices is the nation’s oldest and largest nonprofit organization working to improve care and expand choice for end of life, with 450,000 supporters in the nation.

An estimated 504 Californians have received prescriptions for medical aid in dying as of June 2017 since the law took effect on June 9, 2016, according to Compassion & Choices.

From June 9, 2016 to December 31, 2016, 191 terminally ill Californians received prescriptions from 174 doctors for aid-in-dying medication, according to the California Department of Public Health.

Written by Amy Baxter