(Reuters) - Ride-hailing company Uber Technologies Inc and courier services provider Postmates Inc asked a U.S. court to block a California labor law set to go into effect on Wednesday, arguing the bill violates the U.S. Constitution.

In a lawsuit filed in Los Angeles federal court on Monday, the companies and two app-based drivers said the law, which would make it harder for gig economy companies to qualify their workers as independent contractors rather than employees, was irrational, vague and incoherent.

The office of California Attorney General Xavier Becerra said in a statement on Monday it was reviewing the complaint. The bill, called AB5, faces multiple legal challenges.

The law was signed by California Governor Gavin Newsom in September and has garnered national attention, largely owing to the size of California’s workforce and the state’s leadership role in establishing policies that are frequently adopted by other states.

Backers of the bill, including labor groups, have argued the law protects workers’ rights. By classifying the contractors as employees, the companies would be subject to labor laws that require higher pay and other benefits such as medical insurance.

The bill strikes at the heart of the “gig economy” business model of technology platforms like Uber, Postmates, Lyft Inc, DoorDash and others who rely heavily on the state’s 450,000 contract workers, not full-time employees, to drive passengers or deliver food via app-based services.

Uber, Postmates and other app-based companies said the legislation compromises the flexibility prized by their workforce, and that fewer workers would be hired were they considered employees.

The companies in their Monday lawsuit called AB5 a “thinly veiled attempt” to target and harm gig economy businesses. Singling out app-based workers violates equal protection guaranteed under the constitutions of the United States and California, the companies argued.

“It irreparably harms network companies and app-based independent service providers by denying their constitutional rights to be treated the same as others to whom they are similarly situated,” the lawsuit said.

The companies pointed to allegedly arbitrary exemptions of different non-gig worker groups, including salespeople, travel agents, construction truck drivers and commercial fishermen.

The full impact of the bill remains unclear in the short term, but the lawsuit cited a study saying the bill would increase ride-hailing company Lyft’s operating costs by 20% and lead to some 300,000 fewer drivers in California.

Ron Herrera, secretary-treasurer of Teamsters Local 396 and Teamsters International vice president, said in a statement late on Monday night, that the labour union objects the lawsuit challenging the constitutionality of AB-5.

“Teamsters Local 396 and the broader American Labor Movement must use all of the resources at our disposal to ensure that AB-5 is protected and that workers have a voice at the table,” Herrera added.

Uber, Lyft and food delivery company DoorDash have earmarked $90 million for a planned November 2020 ballot initiative that would exempt them from the law.