California lawmakers passed a watershed gig employment bill early Wednesday morning, paving the way to dramatically change the way companies like Uber and Lyft do business.

The legislation, known as Assembly Bill 5 (AB5), would require gig economy workers to be treated as employees rather than contractors.

The bill received a 29 to 11 vote in the California State Senate and now moves to the State Assembly, where it is expected to easily pass.

Gov. Gavin Newsom (D), who also needs to sign off on the bill, has publicly voiced his support for the legislation. “I am proud to be supporting Assembly Bill 5, which extends critical labor protections to more workers by curbing misclassification,” Newsom wrote in a recent Sacramento Bee editorial.

AB5 has the potential to upend numerous Silicon Valley companies that depend primarily on independent contractors.

Companies as diverse as ridesharing services Uber and Lyft, as well as food delivery services like DoorDash, would have to re-classify many of their drivers as employees, potentially adding significant costs such as benefits.

Those costs could be passed onto consumers in the form of higher prices.

The bill is also seen as an important step for labor activists who hope to unionize drivers.

“AB 5 is only the beginning,” Edan Alva, a driver with Gig Workers Rising, told USA Today. “I talk daily to other drivers who want a change but they are scared. They don’t want to lose their only source of income. But just because someone really needs to work does not mean that their rights as a worker should be stepped all over. That is why a union is critical. It simply won’t work without it.”

Despite the bill’s passage, shares of Uber and Lyft rose in intraday trading Wednesday.

Gov. Newsom told the Wall Street Journal that he’s still in discussion with Uber, Lyft and other affected companies about potential negotiations on the bill.

Uber and Lyft had pledged to spend tens of millions of dollars to fight the legislation. In August Uber proposed a minimum wage for drivers, a move seen as an attempt to combat the California bill.

Follow David Ng on Twitter @HeyItsDavidNg. Have a tip? Contact me at dng@breitbart.com