In the first case ever to challenge the constitutionality of prosecuting teens for “sexting,” a federal appeals court has upheld an injunction that barred a Pennsylvania prosecutor from bringing child pornography charges against girls who refused to attend a class he had designed to educate youths about the dangers of sexting.

In Miller v. Mitchell , a unanimous three-judge panel concluded there was no probable cause to bring any charges against the girls who had appeared in various states of undress in photos shared among a group of teens. Missing from the prosecutor’s case, the court said, was critical evidence about who exactly had transmitted the images.