SAN FRANCISCO — A court ruling expected as soon as Wednesday could determine whether Uber and Lyft shut down across California later this week.

The companies are threatening that they will be forced to shut down after a court in San Francisco last week ruled that drivers for their apps are employees, not independent contractors, under state law. The decision gave them 10 days to make their drivers employees. But the companies must retool their apps to support the employment model, corporate officials said, and cannot meet that deadline.

A California Court of Appeal is expected to rule as soon as Wednesday on their plea to stay that decision during their challenge. The filing deadline for parties to the case is also Wednesday.

If last week’s decision is upheld, passengers could be left stranded starting at midnight Friday, when the companies said they would shut down their apps in the state.

Still, critics point out the companies have had nearly a year to address mandates in the state’s landmark employment law known as AB5, which reclassified certain classes of independent contractors as employees. It’s also a time at which Uber and Lyft have reported business has massively dropped off amid a pandemic.

Uber said it is weighing a shift to a franchise model in California, where employment would be left to independent franchisees rather than Uber’s corporate headquarters, similar to black car or livery services, and the taxi industry. Lyft, too, says it has explored how to make employment work, but company officials did not go into specifics. The New York Times first reported on Uber exploring the franchising model.

“This is similar to how Uber Black operated a decade ago, with higher prices and less reliability. In some models, drivers bring their own cars; in others, the cars are owned by the fleet,” Uber spokesman Noah Edwardsen said. “In either case, drivers would likely earn a predetermined hourly wage for their time on-app — but, in exchange, fleets would need to monitor and enforce drivers’ activity and efficiency, for instance by putting drivers into shifts, dictating where and when they must drive, and enforcing trip acceptance criteria. We are not sure whether a fleet model would ultimately be viable in California.”

Uber and Lyft declined further comment, pointing to their arguments in court that the actions would have a drastic business impact and force them to shut down.

The judge’s order could have broad implications not only for ride-hailing but for the whole tech industry, which has turned to gig work to quickly hire hordes of workers without providing them costly benefits associated with employment, a model the order took direct aim at last week.

The AB5 law establishes a three-prong test requiring employers to prove contract workers are independent. Laborers must be free from the entity’s control and be performing work outside the company’s core business, a test Uber and Lyft failed according to the judge’s ruling in San Francisco this month.

Even before the passage of the law in September, Uber and Lyft have floated a number of arguments to say it should not affect them. They’ve said the provision didn’t apply to them as written. They also said that drivers don’t want to be employees and that a shift to employment would severely harm their business by limiting the supply of drivers, increasing prices and lengthening wait times.

The companies have aggressively marketed their perspective. On Sunday, Lyft users in California were confronted with text messages and push alerts from the ride-haling app warning of potentially drastic changes ahead.

“Save ride-share in California!” one of the messages read. “Ride-share is at risk of shutting down next week in California.”

Meanwhile, drivers are hanging in the balance, as they risk the elimination of already dwindling work during a global pandemic that has strained critical services and resulted in extreme levels of unemployment.

“We have millionaires who are choosing -- not forcing -- but are choosing to lay off ordinary people in the middle of a pandemic because they choose not to follow the law,” said Cherri Murphy, 53, an Oakland, Calif. resident who drives for Lyft full time. “This is not a surprise to anybody; they’ve had an extended amount of time to resolve this. The only people who put themselves against the wall have been Lyft and Uber.”

For the apps, which are seeing historic ridership lows during the global pandemic, a service suspension could work as a negotiating tool in their ongoing fight against the law at a time when they have substantial leverage, legal and policy experts said. Rides bookings have fallen 75 percent or more during the pandemic, and California has been hit especially hard. Still, Uber’s losses have been insulated by a surge of demand in food delivery, which Uber said it would not plan to suspend in response to the court ruling.

The apps seek to use a service suspension to convince customers to support a November ballot measure, the experts said. Proposition 22 would establish a third class of workers with limited benefits. The ballot initiative, backed by $110 million in funding from Uber and Lyft along with food delivery companies, aims to provide drivers with health care and wage protections along with sick pay.

But the companies’ tactics are familiar to former San Francisco District Attorney George Gascón, who previously sued Uber and Lyft over their failure to implement fingerprint-based background checking, which the companies have opposed because of the associated barriers it would present to onboarding drivers.

It appears, he said, that “what they’re trying to do is they’re trying to drag this out 'til November.”

“We have an election coming up where you, the public, are going to have an opportunity to perhaps go back, allow us to bypass the prior legislation that would create an employment relationship with our contractors, but if you don’t we’re pulling out of the market,” he said, summarizing the strategy.

Lorena Gonzalez, the Democratic California Assemblywoman who introduced the bill, said in a written statement that the state welcomes any “innovative” company “small or large” willing to follow the law -- and if Uber and Lyft could not abide, there were plenty of services that could fill the vacuum they left behind.

“We expect corporations in California to abide by basic labor laws like minimum wage, overtime and paying into unemployment,” said Gonzalez, who represents San Diego. “We are confident that law abiding companies will fill the demand, complimenting the services of taxi cabs, private cars and public transportation that currently are available.”

Others say it’s the political officials who have failed them. Jim Pyatt, president of a group called the Independent Drivers Alliance of California, which is backing Prop 22, said he is a retiree works for Uber to make extra income beyond his pension. He’s put in about 40 hours driving time each of the past two weeks, doubling his typical earnings, in anticipation of a shutdown.

“I guess what bothers me the most is if my income stops and this gets shut down Friday or whatever I’ll be okay,” said Pyatt, of Modesto. “I have other income, retirement money and investments. I feel more for ... people that have to get to the city in one place or another.”