A federal judge in Newark on Friday held unconstitutional a New Jersey statute that criminalizes online ads for sex with minors and blocked its enforcement pending trial.

“I certainly recognize the interests … but I think the statute is just problematic” because of free speech, due process and other concerns, U.S. District Judge Dennis Cavanaugh said in granting a preliminary injunction.