SAN FRANCISCO — A California appeals court sided with a lower court judge on an August ruling ordering Uber and Lyft to stop classifying drivers as independent contractors.

Uber and Lyft were given 30 days from an expected later filing to come into compliance with the order. That will effectively require the companies to make drivers employees unless a November ballot measure aimed at codifying their status as independent contractors renders the ruling moot, or a subsequent appeal to the state Supreme Court is successful.

State attorney general Xavier Becerra sued Uber and Lyft in May, along with Los Angeles, San Francisco and San Diego. They alleged the companies were misclassifying hundreds of thousands of workers under Assembly Bill 5, the landmark law requiring companies to classify certain categories of gig workers as employees.

A San Francisco judge ruled in August that Uber and Lyft had to stop classifying drivers as independent contractors, but the decision was stayed through Wednesday’s appeal, which spelled out the terms of lifting the stay.

Uber said it is considering its appeal options, but pointed to coming statewide vote on the status of drivers and urged voters to settle the matter then.

“Today’s ruling means that if the voters don’t say Yes on Proposition 22, 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,” Uber spokesman Noah Edwardsen said.

“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.

The company said it is considering all of its legal options, including appealing to the state supreme court.

The San Francisco City Attorney’s Twitter account lauded the ruling in a tweet. “We just won a unanimous victory for workers in our case against Uber and Lyft in the Court of Appeals,” the office said. “Drivers are employees.”

The ruling would not take effect until a remittitur, the final step in the appeals process, is sent down by the court. The process typically takes two months if the opinion isn’t challenged, the court’s website says. Uber and Lyft would have 30 days from that filing to come into compliance.

Thursday’s decision escalates the heated fight over Proposition 22, the ballot measure pushed by companies such as Uber, Lyft and DoorDash that aims to keep drivers as independent contractors. The campaign in support of the measure, backed by the companies themselves, has raised nearly $200 million, 10 times the funding of the campaign opposing it.

The companies sponsored Prop 22 in response to state lawmakers’ passage of AB5 last year, the legislation that aimed to usher in minimum wage and health care requirements for gig workers including gig drivers. The companies argued that employment would imperil their flexible work models, lengthening wait times and increasing fares. It also may require them to pull out of some markets, potentially jeopardizing tens of thousands of gig jobs.

The campaign has resulted in a messaging war, including on the apps, in users’ email inboxes and through text messages. On Thursday, a group of drivers including labor activists and backers of the effort against Prop 22 sued Uber, alleging the company’s “constant barrage” of pro-Prop 22 messages on the job violated their employment rights. Uber called the lawsuit “absurd" and said it lacked merit.