In a blow to Uber and Lyft, a California appeals court said Thursday that the companies must reclassify their drivers as employees rather than independent contractors, affirming an earlier court decision. The ruling marks a significant development in a months-long legal fight between the companies and the state of California, which in May sued Uber and Lyft and claimed they were in violation of state law. It also puts greater pressure on the companies to successfully pass their California ballot measure which seeks to exempt them from the law. The state has argued that by classifying their drivers as contractors, Uber and Lyft deprive those workers of benefits they are entitled to under a law that took effect January 1. The law, known as Assembly Bill 5, or AB-5, says companies can only treat their workers as independent contractors if those people are free from company control and perform work outside the company’s core business. A reclassification of their workers would represent a radical shift forced on the two businesses, which have built up massive fleets of drivers by treating them as independent contractors and not providing them benefits that they would be entitled to as employees, such as minimum wage, overtime, paid sick leave and unemployment insurance. In August, a California court ordered Uber and Lyft to reclassify their drivers in the state as employees, delivering a win to the state. At the time, both companies had threatened to shut down if they were forced to reclassify their workers. The ruling prompted the companies to appeal. But Associate Justice Jon Streeter of the appellate court wrote in his decision Thursday that the injunction restraining Uber and Lyft from classifying their drivers as independent contractors was valid. “It is broad in scope, no doubt, but so too is the scale of the alleged violations,” he wrote. “Uber and Lyft have used their muscle and clout to resist treating their drivers as workers entitled to those paycheck and benefit protections,” Attorney General Xavier Becerra said in a statement after the ruling. “It’s time for Uber and Lyft to play by the rules.” The change won’t happen immediately. Uber and Lyft still have 30 days to comply with California’s law once the appeals process finishes. That clock typically starts 61 days after the appellate court transfers jurisdiction back to the trial court, assuming the opinion is not challenged. It is unclear if Uber and Lyft would appeal Thursday’s ruling to the California Supreme Court, though Uber said in a statement to CNN Business that “we’re considering our appeal options.” November’s election might also make that court process moot. Uber\n \n (UBER) and Lyft\n \n (LYFT) — along with delivery services that use drivers such as DoorDash, Instacart, and Uber\n \n (UBER)-owned Postmates — have poured $188 million into a California ballot initiative known as Proposition 22 that aims to side-step the AB-5 law. If Prop. 22 passes, ride-hail and delivery drivers would continue to be treated as independent contractors. There would be some concessions on benefits, including a minimum earnings guarantee based on “engaged time” when a driver is fulfilling a ride or delivery request, but not the time they spend waiting for a gig. “This ruling makes it more urgent than ever for voters to stand with drivers and vote yes on Prop. 22,” Lyft spokesperson Julie Wood said in a statement to CNN Business on Thursday. Uber also pivoted to the vote on Prop 22 in its statement, saying that if the measure is not passed, “rideshare drivers will be prevented from continuing to work as independent contractors, putting hundreds of thousands of Californians out of work and likely shutting down ridesharing throughout much of the state.” Last month, the CEOs of both companies told the California appeals court that they planned to comply with the law if the lower court’s injunction was upheld, and if Prop. 22 fails. But compliance “would at a minimum require fundamental changes to Uber’s platform,” wrote Uber CEO Dara Khosrowshahi. He said that the change would “dramatically restrict” the number of drivers Uber could hire, among other moves. Lyft CEO Logan Green wrote that “such implementation may include ceasing rideshare operations in all or some parts of California.” – Jill Disis contributed to this report.