In the spring and summer of 2006, Eric Rinehart, at the time a 34-year-old police officer in the small town of Middletown, Indiana, began consensual sexual relationships with two young women, ages 16 and 17. One of the women had contacted Rinehart through his MySpace page. He had known the other one, the daughter of a man who was involved in training police officers, for most of her life. Rinehart was going through a divorce at the time. The relationships came to the attention of local authorities, and then federal authorities, when one of the girls mentioned it to a guidance counselor.

Whatever you might think of Rinehart's judgment or ethics, his relationships with the girls weren't illegal. The age of consent in Indiana is 16. That is also the age of consent in federal territories. Rinehart got into legal trouble because one of the girls mentioned to him that she had posed for sexually provocative photos for a previous boyfriend and offered to do the same for Rinehart. Rinehart lent her his camera, which she returned with the promised photos. Rinehart and both girls then took additional photos and at least one video, which he downloaded to his computer.

In 2007 Rinehart was convicted on two federal charges of producing child pornography. U.S. District Court Judge David Hamilton, who now serves on the U.S. Court of Appeals for the 7th Circuit, reluctantly sentenced Rinehart to 15 years in prison. Thanks to mandatory minimum sentences, Hamilton wrote, his hands were tied. There is no parole in the federal prison system. So barring an unlikely grant of clemency from the president, Rinehart, who is serving his time at a medium-security prison in Pennsylvania, will have to complete at least 85 percent of his term (assuming time off for good behavior), or nearly 13 years.

Hamilton was not permitted to consider any mitigating factors in sentencing Rinehart. It did not matter that Rinehart's sexual relationships with the two girls were legal. Nor did it matter that the photos for which he was convicted never went beyond his computer. Rinehart had no prior criminal history, and there was no evidence he had ever possessed or searched for child pornography on his computer. There was also no evidence that he abused his position as a police officer to lure the two women into sex. His crime was producing for his own use explicit images of two physically mature women with whom he was legally having sex. (Both women also could have legally married Rinehart without their parents' consent, although it's unclear whether federal law would have permitted a prosecution of Rinehart for photographing his own wife.)

"You can certainly conceive of acts of producing actual child pornography, the kind that does real harm to children, for which a 15-year sentence would be appropriate," says Mary Price, general counsel for the criminal justice reform group Families Against Mandatory Minimums. "But this is a single-factor trigger, so it gets applied in cases like this one, where the sentence really doesn't fit the culpability."

In his sentencing statement, Hamilton urges executive clemency for Rinehart. He points out that under federal law Rinehart received the same sentence someone convicted of hijacking an airplane or second-degree murder would receive. For a bank robber to get Rinehart's sentence, Hamilton writes, "he would need to fire a gun, inflict serious bodily injury on a victim, physically restrain another victim, and get away with the stunning total of $2.5 million." (You might also compare Rinehart's punishment to the treatment given former Elkhart, Indiana, police officer William Lee. Lee, who had a history of "inappropriately touching" women while on the job, was recently fired for using the threat of an arrest warrant to coerce a woman into having sex with him. He was never criminally charged.)

Hamilton is not the first federal judge to express frustration over federal child porn sentencing laws. In May 2010, The New York Times profiled U.S. District Court Judge Jack Weinstein, who after 43 years on the bench has essentially gone rogue, twice throwing out convictions of a man convicted of receiving child pornography because of the five-year mandatory minimum sentence attached to the offense. Weinstein has also indicated that in future child porn cases he will disregard the federal rules of criminal procedure and inform his juries of the sentences defendants will get if convicted.

Rinehart was convicted of producing child pornography. But in cases where a suspect is charged with receiving child pornography, prosecutors need not even show intent. The mere presence of the images on the defendant's computer is enough to win a conviction. "Each image can be a separate count, so these sentences can add up pretty quickly," Price says. "And with a video, each frame can count as a separate image. So if you accidentally or unknowingly download a video that's later discovered on your computer, you could be looking at a really long sentence."

In a 2010 survey (PDF) by the U.S. Sentencing Commission, 71 percent of the 585 federal judges who responded thought the five-year mandatory minimum for receiving child pornography was too harsh. Just 2 percent thought it was too lenient. Only the mandatory minimum for crack cocaine, which has since been reduced, met with wider disapproval.

"When judges don't abide by sentencing guidelines, the logical conclusion would be that the guidelines are flawed, that they should be revised to better reflect culpability," Price says. "Instead, the reaction from Congress is too often to make the guidelines mandatory, or to make the sentences even harsher."

It could actually have been worse for Rinehart. Under federal law, he could have faced up to 25 years in prison. In exchange for a guilty plea, prosecutors agreed to seek only the minimum sentence. Unfortunately for Rinehart, that plea agreement also prevents him from challenging his conviction or sentence. His only hope for early release is executive clemency. Given the clemency records of the last two administrations, that does not seem likely.

Rinehart's case also illustrates the advantages of federalism. Traditionally, criminal law has been left to the states. Age of consent in particular is an issue that is best decided at the state or local level, where lawmakers can set boundaries that reflect local values. The 1984 federal law that Rinehart was charged with breaking, which raised the federal age of consent for explicit images from 16 to 18, was passed under the authority of the Commerce Clause. According to the prevailing interpretation of the clause, the federal government has a legitimate interest in regulating the interstate sale and distribution of child pornography (by prohibiting it) to prevent the exploitation of children.

But the women Rinehart photographed were not children. Under Indiana (and federal) law, they were adults. Furthermore, Rinehart not only was not a producer of actual child pornography; he was not even a consumer. His decision to photograph and upload to his computer photos and video of the two women had no effect whatsoever on the interstate market for child pornography.

You could argue that it makes sense to have a higher age of consent for sexually explicit photos than for sexual activity because photos can be preserved and distributed. That means one bad decision can cause lasting harm, something a 16- or 17-year-old disoriented by love or passion may not be mature enough to consider.

But as Hamilton points out in his sentencing statement, there is no indication that Congress had this rationale in mind when it raised the age of consent in 1984. Instead the congressional record indicates the reason for the change was that prosecutors usually are not able to track down the women depicted in explicit photos to verify their ages. With the cutoff at 16, prosecutors were having problems winning convictions if the girls depicted in the images showed any signs of puberty. Raising the age to 18, a House committee reported, "would facilitate the prosecution of child pornography cases and raise the effective age of protection of children from these practices probably not to 18 years of age, but perhaps to 16."

In Rinehart's case, however, there is no question about the age or identity of the "victims." So why did Assistant U.S. Attorney Steven DeBrota—who has won awards for his efforts to break up actual child pornography rings—decide to turn Rinehart's questionable judgment into a federal felony?

"This seemed like it was all going to be sorted out locally," says Stacy Rinehart, Eric Rinehart's sister. "They had a deal worked out where they were going to charge Eric for some sort of misconduct, and he'd do time in a local jail away from other inmates. Police officers don't tend to do very well in prison. But then the FBI got involved. And no one really knows why. I can only guess it was because Eric was a police officer when all this happened, and maybe they thought that made what he did worse. But he had a good record, and they never put on any evidence that he abused his position."

DeBrota didn't return my call requesting comment. But the fact that a federal prosecutor would pursue a case like this one demonstrates the problem of taking sentencing discretion away from judges. It is true that, technically, Rinehart violated federal law. But no reasonable person would call him a child pornographer, and it seems unlikely that Congress was thinking of people like him when they raised the federal age of consent for sexually explicit images. Putting him away for 15 years hardly feels like justice.

Radley Balko is a senior editor at Reason magazine.