A Minnesota man's confession to abducting and killing 11-year-old Jacob Wetterling nearly 27 years ago has put to rest a mystery that had haunted the state and led to changes in national sex offender laws.

Danny Heinrich made the admission Tuesday as he pleaded guilty to a federal child pornography charge that could put him behind bars for decades. The 53-year-old will not be prosecuted on state murder charges as part of the plea deal.

Following his prison sentence, a civil commitment is possible, meaning he could spend the rest of his life in custody.

As part of the deal, which Jacob's family approved, prosecutors insisted that Heinrich lead them to the boy's remains. He did so last week.