California on Friday reinstated a law allowing physician-assisted-suicide, a move likely to deepen the divisions between advocates and opponents of the controversial practice.

The Fourth District Court of Appeals in Riverside issued an immediate stay, putting the 2016 End of Life Option back into effect. The law allows adults to obtain life-ending drugs if a doctor has determined they have six months or less to live.

Right-to-die advocates hailed Friday's action.

"This stay is a huge win for many terminally ill Californians with six months or less to live because it could take years for the courts to resolve this case," Kevin Díaz, national director of legal advocacy for Compassion & Choices, said in a statement.

California Attorney General Xavier Becerra also praised the decision.

"This ruling provides some relief to California patients, their families, and doctors who have been living in uncertainty while facing difficult health decisions," Becerra said.

This ruling provides some relief to California patients, their families, and doctors who have been living in uncertainty while facing difficult health decisions. — California Attorney General Xavier Becerra

Riverside County Superior Court Judge Daniel Ottolia, who overturned the law last month, accused lawmakers of passing the measure during a Legislative session called to address other matters.

The Life Legal Defense Foundation, American Academy of Medical Ethics and several physicians sued to have the law overturned.

Their lawsuit, Ahn vs. Hestrin, claims the law violates the due process and equal protection guarantees of the U.S. and California constitutions because it fails "to make rational distinctions" between terminally ill adults "and the vast majority of Californians not covered by the act."

More than 100 terminally ill people took drugs to end their lives in the first six months after the law went into effect June 9, 2016, health officials said.

Opponents of Friday’s decision have until July 2 to file objections.

The Associated Press contributed to this report.