California plans to sue Uber and Lyft, the state attorney general said Tuesday, arguing the companies have failed to abide by a landmark law that would reclassify many gig workers as employees.

Attorney General Xavier Becerra announced the state’s plans, saying the ride-hail companies were allegedly engaged in “misclassifying hundreds of thousands of drivers, depriving them of worker protections and access to safety net programs” under the law, which went into effect in January.

The law prescribes a three-prong test to establish that a worker is an independent contractor, including demonstrating the worker is free from a company’s control, is performing a function outside its core business and already performs such work independently.

Uber spokesman Matthew Wing said the company plans to contest the matter in court. “At a time when California’s economy is in crisis with four million people out of work, we need to make it easier, not harder, for people to quickly start earning,” he said in a statement.

Lyft company spokesman C.J. Macklin said in a statement, “We are looking forward to working with the Attorney General and mayors across the state to bring all the benefits of California’s innovation economy to as many workers as possible, especially during this time when the creation of good jobs with access to affordable healthcare and other benefits is more important than ever.”

In response to the law, Uber has implemented mechanisms attempting to prove workers are independent and free from its control, and both companies have joined food delivery services such as DoorDash and Postmates in establishing a $110 million campaign war chest aimed at exempting them from the requirement through a ballot initiative.

Uber CEO Dara Khosrowshahi has pushed for an alternative that would provide workers benefits without classifying them as employees, saying they prize their flexibility to work on their own schedules.

The suit is also the latest financial challenge to the companies amid the novel coronavirus fallout, which led Lyft to announce it was laying off 17 percent of its workforce last week and has Uber contemplating dramatic cost-cutting measures of its own.

Becerra said Tuesday that Uber and Lyft owe the workers back pay and have deprived them of protections and safety net programs typically afforded to employees. Gig workers have sought health-care coverage and sick pay, along with programs such as workers’ compensation to bring them in line with those doing similarly rigorous work.

Becerra said any action would be predicated on making sure Uber and Lyft “play by the rules.”

“They take the workers’ labor, but they won’t accept the worker protections—so taxpayers end up having to help carry the load,” he said in a statement posted to Twitter.