SACRAMENTO, Calif. (AP) — A federal judge on Tuesday temporarily blocked a new California labor law from impacting more than 70,000 independent truckers.

The law 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.

Freelance writers and photographers are also seeking a restraining order against the law set to take effect Wednesday.

U.S. District Judge Roger Benitez of San Diego 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.

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. Uber and Postmates filed a lawsuit on Monday.

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 a law 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 on Tuesday sought quick relief from the new law, which they say could put some independent journalists out of business.

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.

The freelancers sued in mid-December. They argue the law would unconstitutionally affect free speech and the media.