A judge has struck down a proposition that allows Uber, Lyft, and other app-based ride-hailing companies to treat workers as independent contractors—not employees.

Alameda County Superior Court Judge Frank Roesch on Friday, Aug. 20, ruled that Proposition 22 was unconstitutional and unenforceable, USA Today reported. 

Voters approved Proposition 22 in November, which exempted app-based ride-hailing and delivery services from a state law requiring drivers to be classified as employees eligible for benefits and job protections.

Uber, Lyft, and other services spent more than $200 million to campaign for the measure, making it the most expensive ballot measure in state history, but labor organizations opposed it.

In his decision, Roesch ruled that the measure illegally “limits the power of a future legislature to define app-based drivers as workers subject to workers’ compensation law.”

“The entirety of Proposition 22 is unenforceable,” the judge ruled, adding that it was unconstitutional that the law required any future amendments to have a seven-eighths vote of approval to pass the legislature, the Verge reported.

Roesch took issue with the part of the law that requires any future California state law concerning collective bargaining for gig workers to comply with Proposition 22. “It appears only to protect the economic interest of the network companies in having a divided, ununionized workforce, which is not a stated goal of the legislation,” he wrote, adding, the proposition claims to protect Californians who choose to work as independent contractors, but it also “obliquely and indirectly” prevents them from bargaining collectively.

Uber spokesman Noah Edwardsen said the company would appeal, which could likely end up a fight in the California Supreme Court.

“This ruling ignores the will of the overwhelming majority of California voters and defies both logic and the law,” Edwardsen said. “You don’t have to take our word for it: California’s attorney general strongly defended Proposition 22’s constitutionality in this very case.”