A San Francisco Superior Court judge issued a preliminary injunction prohibiting Uber Technologies Inc. and Lyft Inc. from classifying California ride-sharing drivers as independent contractors. The ruling comes in a lawsuit filed by California Attorney General Xavier Becerra and the city attorneys of Los Angeles, San Diego and San Francisco.

Enforcement of the injunction was stayed for a period of 10 days by the ruling, and appeals are already being planned.

“Drivers do not want to be employees, full stop. We’ll immediately appeal this ruling and continue to fight for their independence,” Lyft said in a statement. “Ultimately, we believe this issue will be decided by California voters and that they will side with drivers.”

Becerra’s lawsuit alleges the companies misclassify drivers as independent contractors under California’s AB 5 law, which aims to get tough on misclassification.

“The court has weighed in and agreed: Uber and Lyft need to put a stop to unlawful misclassification of their drivers while our litigation continues,” Attorney General Xavier Becerra said in a statement.

“While this fight still has a long way to go, we’re pushing ahead to make sure the people of California get the workplace protections they deserve,” Becerra added. “Our state and workers shouldn’t have to foot the bill when big businesses try to skip out on their responsibilities.”

In the ruling on Monday, Judge Ethan Schulman noted it appears likely the plaintiffs will prevail. He noted Uber’s and Lyft’s claims they are not “hiring entities” doesn’t appear to hold water.

Those claims “cannot be squared with the undisputed reality that they hire and contract with drivers,” according to the ruling.

Schulman focused on the “B” prong of the ABC test codified under AB 5 that to be an independent contractor a person must perform work that is outside the usual course of a hiring entity’s business.

“It’s this simple: Defendants’ drivers do not perform work that is ‘outside the usual course’ of their businesses,” according to the ruling.

“Defendants’ insistence that their businesses are ‘multi-sided platforms’ rather than transportation companies is flatly inconsistent with the statutory provisions that govern their businesses as transportation network companies, which are defined as companies that ‘engage in the transportation of persons by motor vehicle for compensation,’” the ruling said. “It also flies in the face of economic reality and common sense.”

The A prong of the ABC test deals with control and the C prong refers to whether a person is customarily engaged in an independently established trade. The judge in this case noted because the companies didn’t meet the B prong, there was no need to address the A and C prongs.

“To state the obvious, drivers are central, not tangential, to Uber and Lyft’s entire ride-hailing business,” according to the ruling.

On the other hand, the judge acknowledged Uber and Lyft will have costs in restructuring their businesses — though he wrote the companies should have begun incurring these costs more than two years ago when the California Supreme Court handed down its Dynamex decision, which AB 5 ultimately codified.

“The court is under no illusion that implementation of its injunction will be costless or easy,” according to the ruling. “There can be no question that in order for defendants to comply with AB 5, they will have to change the nature of their business practices in significant ways, such as by hiring human resources staff to hire and manage their driver workforces.”

Uber and Lyft support Proposition 22, which is on the Nov. 3 ballot in California. It will allow the state’s voters to decide whether drivers should be classified as independent contractors. The companies had worked to convince the judge to hold off on the ruling until the vote, but the judge rejected this, according to the court filing. They had also argued there are several lawsuits and arbitrations where similar matters are being decided.

“That Uber and Lyft are attempting to persuade the voters to change that law, an effort that may or may not succeed, is no reason for this court to refrain from deciding the issues currently before it,” according to the ruling.

Schulman also noted the decision could have adverse effect on some drivers who want continued flexibility. “But if the injunction the people seek will have far-reaching effects, they have only been exacerbated by defendants’ prolonged and brazen refusal to comply with California law,” according to the ruling.

Schulman also noted that some drivers work only sporadically, and the pandemic has drastically reduced demand for Uber and Lyft’s services.

“Now, when defendants’ ridership is at an all-time low, may be the best time (or the least worst time) for defendants to change their business practices to conform to California law without causing widespread adverse effects on their drivers,” according to the ruling.

Appeal.  Uber CEO Dara Khosrowshahi said the company is appealing the court order, The Verge reported. However, the company, which is based in San Francisco, may move out of the state. “If the court doesn’t reconsider, then in California, it’s hard to believe we’ll be able to switch our model to full-time employment quickly,” Khosrowshahi told MSNBC.