Uber and Postmates filed a lawsuit Monday to block a California law that could classify more than a million independent gig workers as employees — causing the companies’ costs to skyrocket.

The law known as AB5 — set to take effect Wednesday — targets app-based tech companies and their workers, who would no longer be able to make money on their own terms if it is enforced, the companies argue.

The law is an “irrational and unconstitutional statute designed to target and stifle workers and companies in the on-demand economy,” says the complaint filed in Los Angeles federal court, which asks a judge to declare the law invalid and block the state from enforcing it.

The lawsuit marked the latest salvo in Big Tech’s tooth-and-nail fight against the California law, which would require app-based firms like Uber to pay workers a minimum wage and give them benefits such as sick days.

The law passed in September would force firms such as Uber and Postmates to “fundamentally restructure their business models,” which depend on a hands-off relationship with their millions of workers, the companies argued in the complaint.

“This lawsuit is a microcosm of fighting possibly the largest risk in the ride-sharing industry,” Wedbush Securities analyst Daniel Ives wrote in a Monday note.

Joining the legal battle as plaintiffs were Uber driver Lydia Olson and Postmates courier Miguel Perez, who say they depend on the money and flexibility that app-based work provides.

Driving for Uber lets Olson supplement income from her consulting business while caring for her husband, who has multiple sclerosis, the complaint says. And Perez earns substantially more money through Postmates than he did as a big-rig trucker “while still making it to all of his son’s little league games,” according to the suit.

The office of California Attorney General Xavier Becerra, who’s named as a defendant in the lawsuit, did not immediately respond to a request for comment.

But the California lawmaker who authored AB5 said the lawsuit highlights how Uber has shifted its tactics in fighting the measure. The company’s chief legal officer, Tony West, raised eyebrows in September when he claimed drivers’ work is “outside the usual course of Uber’s business.”

“The one clear thing we know about Uber is they will do anything to try to exempt themselves from state regulations that make us all safer and their driver employees self-sufficient,” California Assemblywoman Lorena Gonzalez said in a statement. “In the meantime, Uber chief executives will continue to become billionaires while too many of their drivers are forced to sleep in their cars.”