Minnesota's revenge porn law is unconstitutional because it criminalizes free speech, the state Court of Appeals ruled Monday in reversing a Dakota County man's conviction for distributing images of his ex-girlfriend having sex.

According to the three-judge panel, part of the problem with the state law is that it uses an overly broad definition of obscenity and doesn't require proof that the person disseminating the images "caused or intended a specific harm." The law also doesn't require the disseminator to know the person in the photographs had a reasonable expectation of privacy.

The court called the behavior of Michael A. Casillas "abhorrent," but determined the state can't punish him under the current law even though the state "legitimately seeks to punish that conduct."

Casillas was charged in 2017 in Dakota County and convicted by a judge of "felony nonconsensual dissemination of private images" because he intended to distribute identifiable images of the woman. He was sentenced to almost two years in prison and appealed.

His conviction was overturned in a 29-page opinion written by Judge Michelle Larkin and signed by Judges Peter Reyes Jr. and Randall Slieter.

After Casillas and his girlfriend (identified only by her initials) broke up, he used her passwords to obtain private sexual photos and videos of her without her consent.

He then told her that he intended to distribute them and she objected, according to the ruling. She was among 44 people who received a screenshot of one of the videos depicting her in a sex act with another person.

The Dakota County district judge determined that Casillas had "seemingly threatened" his ex-girlfriend with publication, knew she wasn't consenting and understood that she had a "reasonable expectation of privacy."

The Appeals Court's analysis said state law applies to a single release of pictures of another person having sex with their intimate parts exposed, if the defendant "knows or reasonably should have known" they didn't consent.

But that's problematic, because the standard allows a person to be convicted even if he didn't actually know the person in the picture created the image with the expectation of privacy and didn't consent. Nor does the law require proof that the disseminator of the images intended to cause harm, the court noted.

The court rejected the state's argument that the law only covers "obscenity," one of the limited categories of speech that isn't protected by the Constitution. The state appeared to argue that any image in which a person is engaged in sex with their intimate parts exposed is "patently offensive" and not protected, the court said.

"Although we agree that such nonconsensual dissemination is offensive, that is not the test for determining whether a work is obscene," the court wrote. Instead, the court said, the Minnesota law illegally extends beyond obscenity to a wide range of "expressive conduct."

The state can appeal the decision, but the Supreme Court is not required to hear it.

Rep. John Lesch, DFL-St. Paul, who chairs the House Judiciary Finance Committee, said he hopes the state appeals the decision quickly, saying it runs contrary to revenge porn decision around the country.