A California appeals court on Friday reinstated a law allowing terminally ill patients to end their lives.

The ruling by the 4th District Court of Appeal allows the controversial law known as the End of Life Option Act to remain in effect, giving patients who have less than six months to live access to lethal medications from their doctors.

Opponents of the law have until July 2 to file a petition opposing the court’s decision.

Atty. Gen. Xavier Becerra fought to reinstate the law in recent weeks with a court appeal. He celebrated the court’s most recent action Friday.

Last month, Judge Daniel A Ottolia ruled the law’s passage was unconstitutional because the Legislature approved the law during a special session dedicated to healthcare issues and this law wasn’t a healthcare matter.

Several attorneys and organizations such as the Life Legal Defense Foundation sued to have the law overturned.

Now, nearly 1 in 5 Americans live in a state where physician-assisted suicide is legal, according to Compassion & Choices.

In the first six months that California’s law was in effect, more than 100 people used it to end their lives. State data show 59% of them had cancer.

Full story at The LA Times.