Andre Haymond had previously been convicted of possessing child pornography, and the government discovered that he may have been in possession of the illegal images while he was on supervised release.

ADVERTISEMENT The judge overseeing his case found a "preponderance of evidence" that Haymond was in possession of the child porn, rather than using the standard of "reasonable doubt." As a result, the judge sentenced Haymond under a federal law that required a mandatory minimum sentence of five years.

A federal appeals court found that while parts of the lower court ruling were incorrect, there was still enough evidence to find that Haymond had possessed the images, in violation of that federal statute.

But a divided Supreme Court found Wednesday that the statute violated his right to a trial by jury. Gorsuch wrote that the court does "not hesitate to hold that the statute violates the Fifth and Sixth Amendments."

"Only a jury, acting on proof beyond a reasonable doubt, may take a person’s liberty. That promise stands as one of the Constitution’s most vital protections against arbitrary government," Gorsuch wrote.

"Yet in this case a congressional statute compelled a federal judge to send a man to prison for a minimum of five years without empaneling a jury of his peers or requiring the government to prove his guilt beyond a reasonable doubt."

—This report was updated at 12:30 p.m.