Lyft (NASDAQ:LYFT) said Thursday that it will suspend its ride-hailing operations in California at midnight tonight in response to a court ruling that would force the company to classify its drivers in the state as employees.

Lyft, Uber Technologies (NYSE:UBER), and other tech companies have been battling against a new California labor law that prohibits companies from relying on contractors who are not entitled to the benefits that full-time employees receive. A California judge last week ruled the companies are violating the law, which says workers can only be considered contractors if they perform duties outside of the usual course of a company's business.

A passenger on a rideshare app.

Image source: Getty Images.

In a blog post Thursday, Lyft said suspending operations "is not something we wanted to do, as we know millions of Californians depend on Lyft for daily, essential trips." The company said the law threatens to reduce the availability of ridesharing in the state, and make it more expensive.

"For multiple years, we've been advocating for a path to offer benefits to drivers who use the Lyft platform -- including a minimum earnings guarantee and a healthcare subsidy -- while maintaining the flexibility and control that independent contractors enjoy," the company said in the post. "Instead, what Sacramento politicians are pushing is an employment model that 4 out of 5 drivers don't support. This change would also necessitate an overhaul of the entire business model -- it's not a switch that can be flipped overnight."

Earlier today, Uber issued a similar warning that it could suspend service at midnight.

The companies are clearly attempting to turn up pressure on politicians to reverse course. Lyft asked customers to support California Proposition 22, which would let companies hire contractors and pay into a pooled benefit fund. The proposition is on the ballot in November.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.