Uber Technologies Inc. and Lyft Inc. failed to persuade a judge to put an extended hold on his order converting their California drivers to employees while they appeal.

At the urging of California’s attorney general, San Francisco Superior Court Judge Ethan Schulman on Thursday refused to indefinitely pause the injunction he issued this week while the companies ask higher courts to review it.

The appeals process could take years in a case that threatens the business model for the ride-hailing giants and the gig industry as a whole. The companies can ask a state appeals court to overrule Schulman and keep his Aug. 10 order on hold beyond its 10-day expiration.

The decision comes a day after Uber Chief Executive Officer Dara Khosrowshahi and Lyft President John Zimmer said their companies might need to temporarily shut down in California if forced to change their business models and provide drivers with costly benefits including health insurance and overtime.

Uber and Lyft, along with Postmates, Instacart and DoorDash, are supporting a ballot measure set for a statewide vote in November that would exempt app-based transportation and delivery companies from the law known as Assembly Bill 5.