Uber and Postmates are suing the state of California over a new law that would likely require them to reclassify workers who are independent contractors as employees and provide them with additional benefits.

In a lawsuit filed Monday in federal court in Central California, the companies ― along with two gig workers who are also plaintiffs ― claim the law is unconstitutional. Uber, a ride-hailing app, and Postmates, an app-based food delivery service, say in the complaint that this is about plaintiffs defending “their fundamental liberty to pursue their chosen work as independent service providers and technology companies in the on-demand economy.”

The companies filed a motion for a preliminary injunction to suspend the new law from being applied to Uber and Postmates while their suit advances.

The new law, Assembly Bill 5, is set to go into effect on Wednesday. It will reclassify many gig economy workers from independent contractors to employees, which could upend the business models of tech companies like Uber and Postmates, which employ hundreds of thousands of drivers and delivery providers as contractors.

The law clarifies the conditions under which a worker should be considered an employee, entitling workers to benefits like a minimum wage, unemployment and disability insurance, and a right to form a union. The law has exemptions for certain groups of workers, such as real estate agents, hairstylists and barbers.

“Uber bosses are spending millions on lawyers so that drivers will keep sleeping in their cars without health insurance,” organizers with the driver-led group Gig Workers Rising tweeted Monday in response to the suit. “Uber bosses are shameless.”

They're spending $30m on a ballot initiative, lobbying for a deal & now suing to block AB5.



Uber bosses are spending millions on lawyers so that drivers will keep sleeping in their cars without health insurance.



Uber bosses are shameless. https://t.co/fGlNshcl3P — Gig Workers Rising (@GigWorkersRise) December 31, 2019

Postmates said in a statement Monday that the new law was a “blunt instrument” that risked “jeopardizing on-demand work opportunities,” pointing to the two plaintiffs in the suit who use the apps to work part time giving rides or making deliveries. Uber also pointed HuffPost toward a Facebook post and Medium post by the two plaintiffs.

Vicky Waters, a spokesperson for California Gov. Gavin Newsom, said in an email statement that “AB 5 is landmark legislation that will undeniably help reduce worker misclassification.”

“At this time, we are evaluating the complaint, and will defend the lawfulness of this important new labor state law.”

Attorney General Xavier Becerra’s office said it was reviewing the complaint.

California Assembly member Lorena Gonzalez (D), who authored the legislation, said Monday that Uber and Postmates’ lawsuit was “all about their stock prices.”

“After I did my taxes, I was operating below minimum wage,” Mostafa Maklad, a 35-year-old driver and organizer with Gig Workers Rising, told HuffPost at a rally in May. He’d been driving for Uber and Lyft for the past four years, studying by day and driving at night, pulling 40- to 50-hour weeks. He lived in San Francisco with six other people in a two-bedroom apartment.

This article has been updated with a statement from Newsom’s office.