James Martin/CNET

Now it's up to California Gov. Gavin Newsom to decide whether Uber and Lyft drivers should be considered employees of the companies.

California's Senate passed legislation Tuesday night in a 29 to 11 vote that could allow for drivers to be classified as employees, rather than as independent contractors. Advocates for the bill, called AB 5, say this means workers will have more protections, like overtime, minimum wage and the right to unionize. AB 5 passed the state Assembly on May 29 in a 53 to 11 vote.

Uber and Lyft drivers are currently classified as independent contractors, sometimes referred to as gig-workers, which means they don't get benefits including Social Security, health insurance, paid sick days and overtime. Many drivers say this system has led to exploitation. They say they've seen lower pay, higher costs and longer working hours as the cost of living has risen over the years. Many contractors for other gig economy companies, like DoorDash, Grubhub and Postmates, have similar complaints.

Uber and Lyft have both said their business models hinge on drivers staying independent contractors. When Uber filed to become a publicly traded company with the US Securities and Exchange Commission in April, it said, "Our business would be adversely affected if drivers were classified as employees instead of independent contractors." One of the reasons for this is because Uber will likely experience a sharp uptick in costs.

Assemblywoman Lorena Gonzalez (D-Southern San Diego County), the bill's sponsor, said businesses can't be allowed to "game the system" by misclassifying workers.

"As lawmakers, we will not in good conscience allow free-riding businesses to continue to pass their own business costs onto taxpayers and workers," Gonzalez said in a statement. "It's our job to look out for working men and women, not Wall Street and their get-rich-quick IPOs."

A Lyft spokesman said it was disappointed in the vote but was prepared to take up the issue with California's voters "to preserve the freedom and access drivers and riders want and need."

"Today, our state's political leadership missed an important opportunity to support the overwhelming majority of ride-share drivers who want a thoughtful solution that balances flexibility with an earnings standard and benefits," the Lyft spokesman said. "The fact that there were more than 50 industries carved out of AB5 is very telling."

Uber didn't immediately respond to a request for comment but has also said that if it couldn't strike a deal on AB 5, it'd take the issue to California voters by sponsoring a ballot initiative in November 2020 that would exempt them from the law. Both companies, along with DoorDash, said they'd spend $30 million each to sponsor the initiative -- bringing the total to $90 million.

Now that AB 5 has passed the California Assembly and Senate it goes to the governor's desk for signing. Newsom has said he supports the bill.

"Reversing the trend of misclassification is a necessary and important step to improve the lives of working people," Newsom wrote in an opinion piece in the Sacramento Bee on Labor Day. "California has the power to act so these workers can have a real voice at work -- one that can transform their lives and reshape our economy."

CNET's Steven Musil contributed to this report.