KNOXVILLE, Iowa — A teenager and her family have filed a lawsuit to try and block a Marion County attorney from charging her with sexual exploitation after she sent photos of herself to a classmate through the mobile messaging app Snapchat.

The Des Moines Register ( ) reports that the Knoxville High School freshman took one photo of herself in a mirror, showing her wearing a sports bra and boy shorts, a style of underwear. In the second photo, the teen was topless and wearing the same underwear, but her hair covered her breasts.

The photos were gathered by authorities earlier this year amid an investigation into nude and semi-nude photos sent by students at the school.

County attorney Ed Bull has threatened through a lawyer to prosecute the teenager in juvenile court unless she participates in a diversion program that includes a class about the dangers of sexting, community service, restrictions on the teenager’s cellphone and computer use and a written admission of guilt.

The family’s lawsuit argues that Bull is trying to punish behavior that wasn’t criminal.

“What’s the difference between sending these photographs and someone sending photographs of themselves in a bathing suit to their significant other,” said Glen Downey, a civil rights attorney representing the family. Downey also said the charge is a violation of the First Amendment since it threatens the girl’s free speech and expression.

Prosecutors nationwide have struggled with how to handle sexting cases among teenagers amid fears that swapping nude photographs can lead to harassment, cyber bullying and manipulation by romantic partners or others. Sexting involves sending sexually explicit photographs or messages via cell phone or other mobile devices. The lawsuit argues that the teenager was not doing anything in the photos that could be considered a “sex act” under Iowa law.

Bull says he’ll make a decision without regard to the lawsuit.

Information from: The Des Moines Register,