A federal judge on Monday rejected a request by Uber and the Postmates courier service to block a California labor law from taking effect, saying its public benefits outweigh the companies’ concerns.

Judge Dolly M. Gee of Federal District Court in Los Angeles said that the companies had proved they could suffer a degree of irreparable harm because of the law, which took effect Jan. 1, but that setting a living wage and regulating employment were more important to the public interest.

The 24-page decision is a blow to employers in the so-called gig economy. Uber and Postmates had sought an injunction against the law while their suit proceeds, saying the new rules will make it harder for them to classify their workers as independent contractors rather than employees.

Judge Gee did not rule on the merits of the case, and her decision does not stop the lawsuit, which was filed at the end of 2019 against the State of California.