Uber (UBER) and Lyft (LYFT) won a major battle on Tuesday as Prop 22 was supported by 58% of voters in California.

With the approval of Prop 22, the two rideshare companies, along with DoorDash, Instacart, Postmates, and other gig economy companies, can continue to use contract workers without classifying them as company employees.

The new legislation exempts Uber and Lyft from providing benefits to these workers, such as health insurance under California law, saving the two companies more than an estimated $100 million a year on employment costs, Bloomberg reported.

The gig economy law was a significant win for Uber and Lyft, which heavily campaigned for the passing of Prop 22, spending a combined $200 million, Bloomberg said. The campaign was the most expensive ballot measure in California’s history, with those opposed to the proposition, primarly led by labor unions, spending only about a tenth as much, the news outlet said.

According to California’s Secretary of State’s Office, 58.4% of voters supported the proposition with 41.6% opposed, with more than 94.5% of the vote in as of Wednesday morning. The proposition needed 50% of the vote to become law in California.

However, drivers for Uber and Lyft will reap some additional benefits and protections as contract employees under Prop 22, such as a health insurance stipend when actively driving at least 15 hours a week.

The legislation also sets a benchmark for other state legislation for the app-based ride-hailing industry beyond the state of California. Uber and Lyft had threatened to pull out of California if they lost the proposition, CBS News reported. 

Shares of Uber were trading at $40.25 as of premarket open, up $4.49 or 12.56% while shares of Lyft were trading at $30.70, up $4.47 or 17.07% at the same time.