An appellate court ruled last week Uber Technologies Inc. and Lyft Inc. must reclassify their California drivers as employees as required by state law AB 5, affirming a lower court’s August ruling in a case filed by California Attorney General Xavier Becerra and the city attorneys of Los Angeles, San Diego and San Francisco.

AB 5 is the law that codifies the state’s Supreme Court’s 2018 Dynamex ruling that adopted a more-strict “ABC” test for determining whether workers are independent contractors or employees. AB 5 went into effect in January.

Bloomberg Law reports last week’s ruling is the gravest threat to the companies’ business models yet.

However, the companies have 30 days after the case is sent back to trial court to comply. By that time, the point might be moot, as California voters next week weigh in on the issue via a ballot measure supported by the companies that would overturn AB 5. If voters reject the measure, however, both companies have threatened to shut down in the state, Bloomberg reports.

If that were to happen, “hundreds of thousands of Californians” would lose their jobs, CNBC reported. Millions of Californians would lose their rides, Forbes reports.

Uber and Lyft had argued that the August ruling against them was “radical” and “unprecedented,” which the appeals court rejected.

“Although the business context may be relatively new, we conclude that the injunction was properly issued in accordance with enduring principles of equity,” the three-judge appeals panel said in its ruling. “It is broad in scope, no doubt, but so too is the scale of the alleged violations.”