Uber Technologies Inc. and Lyft Inc. are preparing to suspend their ride-hailing services in California beginning on Friday morning unless an appeals court rules at the last minute they cannot be forced to treat their drivers as employees, rather than independent contractors.

Lyft, in a blog post Thursday, said it would suspend its California operations at midnight.

Uber, in a blog post, said it would have to temporarily shut down unless the appeals court intervenes. The company did not respond to requests for comment Thursday on whether it would also shut down at midnight.

The companies have sought the intervention of an appeals court to block an injunction order issued by a judge last week. That ruling forced the companies to treat their drivers as employees starting Thursday after midnight, but Uber and Lyft have said it would take them months to implement the mandate.

The appeals court has not yet intervened.

The threat to suspend service in the most populous U.S. state marks an unprecedented escalation in a long-running fight between U.S. regulators, labor groups and gig economy companies that have upended traditional employment models.

California, a state frequently seen as a leader in establishing policies that are later adopted by other states, in January implemented a new law that makes it difficult for gig companies to classify workers as independent contractors

A judge on Aug. 10 ruled that Uber and Lyft had to comply with the law beginning on Friday, forcing them to treat their ride service drivers as employees entitled to benefits including minimum wage, sick pay and unemployment insurance.

Uber’s fast-growing food delivery business Eats is not impacted by the shutdown, the company has said. Other gig economy companies, including DoorDash and Instacart, will also be able to continue operating under the contractor model.

The shutdown comes at a time when demand for rides has plummeted amid the coronavirus pandemic, with California among the U.S. states with the slowest recovery, according to the companies.

California represents 9 percent of Uber’s global rides and Eats gross bookings, but a negligible amount of adjusted earnings, Uber said in November. Lyft, which only operates in the U.S. and does not have a food delivery business, last week said California makes up some 16 percent of total rides.

Uber and Lyft say the vast majority of their drivers do not want to be employees. The companies say their flexible on-demand business model is not compatible with traditional employment law and advocate for what they call a “third way” between employment and contractor status.

Lyft, Uber, DoorDash, Instacart and Postmates are spending more than $110 million to support a November ballot measure in California, Proposition 22, that would enshrine their “third way” proposal and overwrite the state’s gig worker bill.

Labor groups reject the companies’ claims that current employment laws are not compatible with flexible work schedules and argue the companies should play by the same rules as other businesses. They say the companies’ ballot measure would create a new underclass of workers with fewer rights and protections.

An Aug. 9 poll among Californians by Refield & Wilton showed 41 perent of voters planned to support the companies’ proposal and 26 percent oppose it, with the remainder still undecided.