California’s gig economy law applies to some 70,000 truck drivers who can be classified as employees of companies that hire them instead of independent contractors, giving them a right to overtime, sick pay or other benefits, a federal appeals court ruled Wednesday.

The 9th U.S. Circuit Court of Appeals in San Francisco overturned a ruling last year by a federal judge that said federal interstate transportation law pre-empted 2019’s Assembly Bill 5.

In overturning that decision, the appellate court’s 2-1 decision found that AB5 doesn’t conflict with federal law because it is “a generally applicable labor law that affects a motor carrier’s relationship with its workforce and does not bind, compel, or otherwise freeze into place the prices, routes, or services.”

The ruling is “a massive victory for California’s truck drivers, who for far too long have faced exploitation and misclassification at the hands of trucking companies that place corporate profit ahead of drivers’ safety and well-being,” the International Brotherhood of Teamsters said in a statement.

But the California Trucking Association, which sued over the law, said it would take “whatever legal steps are necessary to continue this fight on behalf of independent owner-operators and motor carriers operating in California.”

The association had argued the law could make it harder for independent drivers who own their own trucks and operate on their own hours to make a living by forcing them to be classified as employees.

Port truck drivers in Long Beach and Los Angeles have organized and fought against misclassification for years, going on strike multiple times to bring attention to the “wage theft” that they said resulted from their employers hiring them as independent contractors.

Truck drivers have won a string of recent court decisions including 20 drivers being awarded $6 million by the California Labor Commissioner in 2019 who said drivers were improperly classified as non-employees.

The case could wind up before the U.S. Supreme Court, especially since in 2016 the 1st U.S. Circuit Court of Appeals in Boston ruled that a similar Massachusetts law did conflict with federal law. AB5 expanded a California Supreme Court ruling that limited businesses from classifying certain workers as independent contractors.

The law is one of the strictest in the country for determining when a company must treat its workers as employees with benefits such as minimum wage, overtime and sick days. Last year, California voters passed Proposition 22, which exempted app-based ride-hailing and delivery services from AB5.

The measure was the most expensive in state history with Uber, Lyft and other services pouring $200 million in support of it. A federal lawsuit by a labor union and some drivers is challenging the proposition.

Staff reporter Jason Ruiz contributed to this report.