A federal judge has temporarily blocked a new California labor law from impacting more than 70,000 independent truckers. The law, passed late last year, makes it harder for companies to classify workers as independent contractors instead of employees, who are entitled to minimum wage and benefits such as workers compensation.

U.S. District Judge Roger Benitez of San Diego on Tuesday granted a temporary restraining order sought by the California Trucking Association while he considers imposing a permanent injunction.

He said the association is likely to eventually prevail on its argument that the state law violates federal law. He also ruled the truckers would otherwise be likely to suffer irreparable harm, and that temporarily blocking the law from applying to truckers is in the public interest.

Get Breaking News Delivered to Your Inbox

The public focus of the law has largely involved ride-share companies such as Uber and Lyft and food delivery companies like DoorDash and Postmates, which have vowed their own challenges in court and at the ballot box. There are about 400,000 workers in California doing such "gig" work, according to various estimates. However, an additional 1.5 million workers in California, doing jobs such as cleaning, construction, building maintenance and trucking, are likely to feel its effects.

The trucking association's lawsuit, filed in November, said many truckers would have to abandon $150,000 investments in clean trucks and the right to set their own schedules in order for companies to comply with AB5, which the group says illegally infringes on interstate commerce.

Democratic Assemblywoman Lorena Gonzalez of San Diego said the state will continue to fight the association "to return jobs in the trucking industry to good, middle class careers."

"For decades, trucking companies have profited from misclassifying drivers as independent contractors, taking away rights such as meal and rest periods and fair pay," she said in a statement.

Freelance writers and photographers also sued last month to block the law, arguing that it would unconstitutionally affect free speech and the media.

On Tuesday, the American Society of Journalists and Authors and the National Press Photographers Association asked a federal judge to grant them a temporary restraining order while he considers a more permanent injunction in March. However, no date was immediately set for a hearing or decision by U.S. District Judge Philip Gutierrez in Los Angeles.

Uber has maintained that the law doesn't apply to its workers, and filed a lawsuit on Monday, along with Postmates, challenging it. Support for AB5 is split among drivers, according to Wedbush analyst Dan Ives. "[S]ome drivers have made a career out of ride-sharing and are eager to receive benefits, regulated wages and all the other perks of becoming an employee while other drivers enjoy the flexibility of choosing their own hours, and can work for other operators as they please," Ives wrote in a note.

Key to the business model of Uber and Lyft, and other so-called gig economy companies, is that putting people to work on their platform costs the company very little. Changing that by calling drivers employees represents "possibly the largest risk in the ride-sharing industry," Ives wrote.

-- CBS News' Irina Ivanova contributed reporting.