Two national groups representing freelance writers and photographers on Tuesday filed the second legal challenge to California's broad new labor law that aims to give wage and benefit protections to many people currently working as independent contractors.

While the public focus has been largely on ride-share companies such as Uber and Lyft, the lawsuit brought by the American Society of Journalists and Authors and the National Press Photographers Association, who have 650 members between them, says the law would unconstitutionally affect free speech and the media.

The law — set to take effect January 1 — makes it harder for companies to classify workers as independent contractors instead of employees, who are entitled to minimum wage and benefits such as worker's compensation. It establishes the nation's strictest test and could set a precedent for other states to follow. (New Jersey lawmakers have introduced a similar bill, and worker advocacy groups in New York are pushing for similar legislation in that state.)

Get Breaking News Delivered to Your Inbox

The law establishes a limit of 35 submissions per year, per client, for freelance writers, editors, and visual journalists before they can be considered employees. The lawsuit calls the limit "irrational and arbitrary" and says it would threaten freelancers' livelihood.

The new law creates "unconstitutional content-based distinctions about who can freelance," the lawsuit argues, noting that "the government faces a heavy burden of justification when its regulations single out the press."

The bill's author, Democratic Assemblywoman Lorena Gonzalez of San Diego, did not immediately comment, nor did Attorney General Xavier Becerra, who is named in the lawsuit.

The Pacific Legal Foundation, a nonprofit libertarian group, brought the lawsuit on behalf of the organizations and filed it in federal court in Los Angeles. It asks a judge to invalidate the portion of the law that would affect them.

The lawsuit was filed the day after the digital sports media company SB Nation, owned by Vox Media, announced that it would end its use of more than 200 California freelancers, switching instead to using a much smaller number of new employees.

One of the freelancers affected was Lucas Hann, who wrote sports stories for SB Nation. In a post for Medium, Hann said he spent eight years working for the company and published more than 1,300 articles.

"I do not think it is a secret that Vox Media's employment model has long been unsustainable," Hann said. "They use contractor designations to avoid all sorts of labor laws, including providing minimum wage and benefits — and they well exceed the intended use of contractor."

Hann praised California for going after companies who exploit contractors, and said Vox Media fired its contractors as a move "to protect their disproportionate and exploitative revenue share from team sites."

SB Nation has conceded what those of us who have worked here for years already knew: their employment model is exploitative, unethical, and illegal. California is the first of many states who will start holding them accountable. https://t.co/gObOlvhPgd — Lucas (work stoppage edition) (@LucasJHann) December 16, 2019

The California law "makes it impossible for us to continue with our current California team site structure because it restricts contractors from producing more than 35 written content 'submissions' per year," Vox Media said on its website.

The impending law implements a legal ruling last year by the California Supreme Court regarding workers at the delivery company Dynamex. But the Pacific Legal Foundation lawsuit says that ruling would have had little direct effect on professionals engaged in "original and creative" work, like its clients.

The law gives newspaper companies a one-year delay to figure out how to apply to the law to newspaper carriers, who work as independent contractors. The California Newspaper Publishers Association, which sought the extension, did not immediately comment on the new lawsuit.

The California Trucking Association last month filed the first challenge to the law, arguing it would harm independent truckers. Uber, Lyft and DoorDash have said they will spend $90 million on a 2020 ballot measure opposing the law if they can't negotiate other rules for their drivers. Uber also said it will keep treating its drivers as independent contractors and defend that decision in court if needed.