An appeals court has struck down Texas’ “revenge porn” law, ruling that the statute is overly broad and violates the First Amendment.

The 2015 state law targets what author state Sen. Sylvia Garcia, D-Houston, called “a very disturbing internet trend” of posting a previous partner's nude or semi-nude photos to the web without the partner's permission, often with identifying information attached. Inspired in part by the testimony of Hollie Toups, a Southeast woman whose intimate photos were posted online, the law made posting private, intimate photos a misdemeanor, carrying a charge of up to a year in jail as well as a $4,000 fine.

The 12th Court of Appeals, based in Tyler, said the law is unconstitutional because of its broad-based content restrictions that infringe on free speech. The First Amendment, wrote Chief Justice James Worthen, usually prohibits “content-based” restrictions.

The Texas Attorney General’s Office will lead the fight to overturn the court’s ruling — an appeal which could make it to the state’s highest criminal court, the Austin American-Statesman reported. For now, the ruling only blocks the law in more than a dozen Northeast Texas counties under the 12th Court of Appeals, though courts elsewhere in the state would likely consider its reasoning.

The Texas Tribune thanks its sponsors. Become one.

The court also took issue with a provision of the law that allowed it to target third parties who may have “unwittingly” shared intimate photos.

Dozens of other states have revenge porn laws, though they vary in scope and severity of punishment.

Wednesday’s ruling also asks a lower court to dismiss the charges Jordan Bartlett Jones, who was accused of posting an intimate photo of a woman without her consent. It was his case that put the law in front of the appeals court.