SAN FRANCISCO — Uber and Lyft will continue operating in California after an appeals court issued a stay on an order that would have prompted the ride-hailing companies to shut down.

Uber and Lyft had said they would suspend their ride-hailing service in the state beginning Friday unless a California Superior Court decision requiring them to give drivers full employment was delayed while they appeal. The appeals court issued the stay Thursday.

The companies were initially given 10 days to make their drivers employees after a San Francisco judge found they had failed to follow the state’s landmark employment law, known as AB5, which specifies that companies must prove independent contractors are free from their control and performing work outside their core business. The appeals court extended that window indefinitely, staying the order “pending resolution” of Uber and Lyft’s legal challenge to the order.

“We are glad that the Court of Appeals recognized the important questions raised in this case, and that access to these critical services won’t be cut off while we continue to advocate for drivers’ ability to work with the freedom they want,” Uber spokesman Noah Edwardsen said in a statement.

Lyft officials sought to use the threat of pulling service as a rallying cry around a November ballot measure, Proposition 22, that would allow them to avoid employing drivers by establishing a third class of worker with limited benefits.

“While we won’t have to suspend operations tonight, we do need to continue fighting for independence plus benefits for drivers,” said Lyft spokeswoman Julie Wood in a statement. “That’s the solution on the ballot in November, and it’s the solution drivers want because it preserves their ability to earn and to use the platform as they do now — whenever they want — while also getting historic new benefits.”

The company has cited limited data, including an unscientific survey, arguing drivers prefer the independent contract model.

Lyft earlier on Thursday said in a blog post it would shut down operations at midnight without a stay.

“This is not something we wanted to do, as we know millions of Californians depend on Lyft for daily, essential trips,” Lyft said in a blog post.

Uber had similar plans to suspend service around midnight Friday.

Critics lament a shutdown was avoidable, even without the ruling, because the companies have had nearly a year to comply with AB5′s employment provision. They say Uber and Lyft would have leveraged a service suspension to drum up support for the November ballot initiative.

Uber has said it is exploring a franchising model that would shift the employment burden from headquarters to independent operations seeking to run ride-hailing services under its banner, similar to black car and livery fleets, or the cab industry. Lyft, too, has explored avenues for employment, though company officials declined to provide details.

It was unknown how long any ride-hailing shutdown would have lasted. Uber and Lyft said they would need months to retool their businesses to support an employment model. They argued a shutdown would cut into their core business model by lengthening wait times and increasing fares, in part because there would be fewer drivers available at customers’ convenience.

Uber’s stock rallied on the news, surging nearly seven percent on Thursday. Lyft was up nearly six percent.

Uber would not have suspended Uber Eats, company officials said, because the lawsuit made arguments specific to the companies’ ride-hailing businesses. But food and grocery delivery services, DoorDash, Postmates and Instacart, have joined Uber and Lyft in pouring $110 million into the ballot initiative, wary of being targeted as well.

On Wednesday, DoorDash sent customers an email urging them to support Proposition 22, telling them “deliveries you’ve grown to rely on is at risk.”

Oral arguments for the Uber and Lyft case were set for Oct. 13. If the preliminary injunction is upheld and Proposition 22 fails, the court said, Uber and Lyft would have 30 days to come into compliance with the employment requirements of AB5.