texting
© Sonja Krebs / Global Look Press
Sexting minors is illegal, but having sex with them is okay, an Indiana Supreme Court has ruled.

Indiana high school teacher Sameer Thakar faces three years in prison for sending nude photographs to a 16-year old girl after the Supreme Court ruled earlier this week to reverse a lower court's decision to throw out the case.

Thakar began texting the teenager in 2014, when he was 38. After a short period in which the girl told him she was underage, he then sent her images of his erect penis, court documents reveal.

He was charged with one count of felony dissemination of matter harmful to minors, but argued in court that the charge doesn't make sense.

In Indiana, it is legal for adults to have consensual sex with 16 year olds. It is illegal, however, for a person to knowingly send sexually explicit photographs to someone under 18, which is classed as disseminating material harmful to minors.

The court originally threw out the charges, explaining it was "patently illogical" that a man could have sex with a teenager, but not send them images. The case was appealed and ended up in Indiana's Supreme Court.

The Supreme Court found the charges should be upheld, despite the "inconsistent" law. It found no conflict between the two rules, as both can be complied with at the same time.

"With respect to a 16-year-old, consensual sexual activity in person is permitted, the dissemination of a sexually explicit photograph (consensually or otherwise) is not," Justice Mark Massa wrote.

Massa said the court interprets the text of the law, and that it's up to state lawmakers to sort out the inconsistency.