JACKSON, Miss. (AP) — A federal judge on Monday blocked a Mississippi law that would require users of websites and other digital services to verify their age.

The preliminary injunction by U.S. District Judge Sul Ozerden came the same day the law was set to take effect. A tech industry group sued Mississippi on June 7, arguing the law would unconstitutionally limit access to online speech for minors and adults.

Legislators said the law is designed to protect children from sexually explicit material.

“It is not lost on the Court the seriousness of the issue the legislature was attempting to address, nor does the Court doubt the good intentions behind the enactment of (the law),” Ozderen wrote.

The U.S. Supreme Court has held that any law that dealing with speech “is subject to strict scrutiny regardless of the government's benign motive,'” Ozerden wrote.

Republican Gov. Tate Reeves signed the legislation after it passed the GOP-controlled House and Senate without opposition from either party.

The suit challenging the law was filed by NetChoice, whose members include Google, which owns YouTube; Snap Inc., the parent company of Snapchat; and Meta, the parent company of Facebook and Instagram.

NetChoice has persuaded judges to block similar laws in other states, including Arkansas, California and Ohio.

Chris Marchese, director of the NetChoice Litigation Center, said in a statement Monday that the Mississippi law should be struck down permanently because “mandating age and identity verification for digital services will undermine privacy and stifle the free exchange of ideas.”

“Mississippians have a First Amendment right to access lawful information online free from government censorship,” Marchese said.

Mississippi Attorney General Lynn Fitch argued in a court filing that steps such as age verification for digital sites could mitigate harm caused by “sex trafficking, sexual abuse, child pornography, targeted harassment, sextortion, incitement to suicide and self-harm, and other harmful and often illegal conduct against children.”

Fitch wrote that the law does not limit speech but instead regulates the “non-expressive conduct” of online platforms. Ozerden said he was not persuaded that the law “merely regulates non-expressive conduct.”

Utah is among the states sued by NetChoice over laws that imposed strict limits for children seeking access to social media. In March, Republican Gov. Spencer Cox signed revisions to the Utah laws. The new laws require social media companies to verify their users' ages and disable certain features on accounts owned by Utah youths. Utah legislators removed a requirement that parents consent to their child opening an account after many raised concerns that they would need to enter data that could compromise their online security.

Emily Wagster Pettus is a Mississippi statehouse and political reporter at The Associated Press.

Since 1846, The Associated Press has been breaking news and covering the world's biggest stories, always committed to the highest standards of accurate, unbiased journalism. The Associated Press was founded as an independent news cooperative, whose members are U.S. newspapers and broadcasters, steadfast in our mission to inform the world.