By G9ija

A California appeals court handed Uber and Lyft a major legal defeat on Thursday, ruling that a lower court was correct in granting an injunction forcing the companies to reclassify their drivers as employees under the state’s gig worker law AB-5.

In their ruling, judges from California’s first district Court of Appeal said they were “unpersuaded” by arguments from Uber and Lyft that the lower court erred in issuing the injunction.

The judges also invoked the late Supreme Court Justice Ruth Bader Ginsburg in their ruling, noting that her “cogent explanation” of the legal test for reviewing a trial court’s decision to issue an injunction played a key role in its analysis of the case.

“This decision makes it abundantly clear that Uber and Lyft have been breaking the law for years,” San Francisco city attorney Dennis Herrera said in a statement Thursday evening.

“This is a victory for the people of California and for every driver who has been denied fair wages, paid sick days, and other benefits by these companies. For too long Uber and Lyft have illegally denied their drivers basic workplace protections and shifted that burden onto drivers and taxpayers. Uber and Lyft have pocketed millions of dollars by leaving drivers in the lurch and taxpayers to foot the bill,” Herrera said.

The ruling doesn’t take effect, however, until 30 days after the court issues a remittitur in the case, a step that kicks the case back to the lower court after any further legal challenges — or lack thereof — to Thursday’s ruling.

Uber and Lyft both told Business Insider that they’re weighing all legal options.