Labor legislation known as Proposition 22 effectively overturned a California law requiring app-based businesses to reclassify their drivers and provide employee benefits.

A California voter-approved referendum that lets many "gig workers" be treated as independent contractors was ruled unconstitutional on Friday, setting up more legal fights over the controversial measure.

The labor legislation known as Proposition 22—heavily backed by Uber, Lyft and other app-based, on-demand services—effectively overturned a California law requiring them to reclassify their and provide .

Yet an Alameda County Superior Court judge ruled the law violated California's state Constitution because it "limits the power of a... legislature to define app-based drivers as workers subject to workers' compensation law."

Uber attacked the decision and pledged to challenge it, while some workers impacted by the rule welcomed the judgement as an opportunity to fight for better treatment.

"This ruling ignores the will of the overwhelming majority of California voters and defies both logic and the law," the ride-hailing service said in a statement.

"Meanwhile, Prop. 22 remains in effect, including all of the protections and benefits it provides independent workers across the state," it added.

Erica Mighetto, a driver in San Francisco, said the court had recognized the referendum as an assault on labor rights.

"I believe that now drivers have a real opportunity to fight for a and a fair workplace," Mighetto added. "What a triumph for the future of app-based work."

Benefits and collective bargaining

The November vote came after a contentious campaign with labor groups claiming the initiative would erode worker rights and benefits, and with backers arguing for a new, flexible economic model.

The victory for the "gig economy" in California was expected to echo across the United States, in a boon for app-based services while igniting fears that big business is rewriting labor laws.

Under the proposition, drivers remained but Uber and Lyft were to pay them a number of benefits including a minimum wage, a contribution to health care and other forms of insurance.

Critics of the measure said it failed to take into account the full costs borne by drivers.

Uber and Lyft claimed most drivers support the contractor model.

But many drivers were still bitter and angry after the vote, and said they have all the inconveniences of being independent, and none of the advantages.

Drivers for companies such as Uber and Lyft use their own cars and chose their own work schedules in what the companies describe as cherished independence.

But how work days turn out is orchestrated by a sophisticated computer algorithm that artfully nudges drivers to accept as many fares as possible—including less profitable routes.

Some drivers see the situation as basically having a software version of a manager, making them tantamount to employees—without the security such an arrangement would give them.

Prop. 22 does guarantee some support such as pay topping the and supplemented health care coverage—but it designates drivers as self-employed, meaning they do not have the right to some regular employee benefits such as .