SAN FRANCISCO — California’s lawmakers on Wednesday took their first major step toward settling the debate about whether Uber and Lyft drivers are employees or contractors.

The state Assembly passed Assembly Bill 5, which would enshrine a 2018 California Supreme Court ruling that laid out a three-part “ABC” test to determine when a worker can be considered a contractor, factoring in the kind of work being done and the business of the hiring company.

The 2018 case, first brought more than a decade ago by a driver for a parcel and document delivery company, was initially celebrated by labor activists, who believed it would establish the precedent necessary for drivers and many other contract workers to receive the benefits and protections legally afforded to employees in California.

But in the more than a year since the ruling, known as Dynamex, few major gig-economy companies have converted their workforce from contractors to employees.

“They’re just gaming the system,” said Assemblymember Lorena Gonzalez, a Democrat who wrote the bill, which will now need to pass the state Senate and gain approval from the governor to become law.

For Uber and Lyft drivers, among others, the law would mean a bevy of legal rights and protections, including better pay, benefits and the ability to unionize. As employees, drivers would have some stability and predictability after seeing their earnings decline in what had once been a reasonably lucrative gig.

The law would be a blow to Uber and Lyft at a crucial time for the ride-hailing companies, both of which remain unprofitable. The stocks of both companies are now publicly traded, and investors have shown skepticism about whether they will ever make money. In their mandatory Securities and Exchange filings, each company listed the prospect of being forced to consider drivers as employees as risks to their businesses.

Rideshare drivers for Uber and Lyft stage a strike and protest at the LAX International Airport, over what they say are unfair wages in Los Angeles on May 8, 2019. Mark Ralston / AFP - Getty Images file

Uber on Thursday announced that it lost more than $1 billion in the first three months of 2019.

Uber referred a request for comment to the Internet Association, a trade group that represents a wide range of major technology companies. Kevin McKinley, director of California government affairs for the group, said the bill threatens the future of “internet-enabled freelance work” in the state.

Lyft did not respond to requests for comment.

The law would also add muscle to California’s recent willingness to push back against some of the major tech companies that call the state home.The state is preparing to enforce a wide-ranging data privacy bill that will go into effect on Jan. 1.

Big businesses shouldn't be able to pass their costs onto taxpayers while depriving workers of the labor law protections they are rightfully entitled to. Thank you to my Assembly colleagues for the bipartisan support today and voting #YesOnAB5. #AB5 now heads to the State Senate. — Lorena Gonzalez (@LorenaAD80) May 29, 2019

Prior to the bill, gig-economy companies had little to fear. While the 2018 Dynamex ruling assumed workers were employees unless proven otherwise, the “ABC” test has yet to be enforced on Uber and Lyft, according to academics and labor activists who spoke with NBC News.

“The answer is pretty simple,” said Steve Smith, a spokesman for the California Labor Federation, a coalition of unions that has pushed for the new bill. “Employers are not complying with the decision.”

In the year since the Dynamexruling, little action has been taken by government entities to apply the “ABC” test. In May 2018, San Francisco City Attorney Dennis Herrera subpoenaed Uber and Lyft for records to determine whether they were in compliance with Dynamex. However, the office has yet to announce the results of that investigation.

“We’ve received some information pursuant to these subpoenas,” John Coté, a spokesman for Herrera, emailed. “We are considering our options going forward.”

NBC News sent requests for comment to the city attorneys for Oakland, Los Angeles, Sacramento and Fresno, and none responded. The California Attorney General’s Office referred inquiries to the Labor Commissioner’s Office, which said in a statement that misclassification was a “very serious” and ongoing issue, but would not say whether the agency was targeting Uber or any other gig economy company.

Uber and Lyft face growing unrest from drivers, who claim that their take-home pay has declined in recent years. Lawsuits filed by Uber drivers in recent years have alleged pay as low as $80 per week, after expenses. Earlier this month, hundreds of people turned up in front of Uber’s downtown headquarters to protest what they say are unfair labor practices. Drivers went on strike in cities nationwide.

“For the average driver, [Dynamex] might as well have not happened,” said Christian Perea, a Berkeley-based Uber driver and founder of Hustle by Design, a web publication about ride-sharing. Perea added that neither Uber nor Lyft had communicated any information about the Dynamex ruling to drivers.

Gov. Gavin Newsom, a Democrat, addressed the case directly in his first State of the State address in February, calling for a “new modern compact for California’s changing workforce.”

“This is much bigger than Dynamex,” he added.

Newsom has not taken a public position on the Assembly bill, with his office saying he will evaluate the bill “on its own merits.”

Veena Dubal, a labor law professor at the University of California at Hastings, said that the bill’s passage is not guaranteed.

“The truth is that it upends this tech model that venture capitalists have poured so much money into,” she said. “And there is a reticence on behalf of the governor’s office and legislators to allow these models to be upended because they see it as good for California’s economy.”

Gonzalez said she did not have much sympathy for Uber or Lyft.

“People who relied on child labor didn’t want child labor to go away,” she said. “People always think that they’re special. All employers are the same and you learn how to work within the laws that are set out.”

“We don’t allow people to skirt environmental laws because they’re hard to comply with.”