WARNING: This article contains graphic content that may be upsetting.

MINNEAPOLIS - Standing before a packed federal courtroom that included Jacob Wetterling's parents and extended family, Danny Heinrich admitted to abducting and killing the boy as part of a deal that will keep him behind bars for decades.

Danny Heinrich new mug 1280
Danny Heinrich
Sherburne County Jail

After pleading guilty to a single count of receiving child pornography, Heinrich coldly detailed how he kidnapped and killed Jacob. Heinrich told the courtroom how on that fateful night he was driving through St. Joseph around 8 p.m. when he noticed three boys on bikes with a flashlight on a dead end road. He described pulling into a driveway after they passed him.

Danny Heinrich in federal court confessing to the abduction and murder of Jacob Wetterling.
Danny Heinrich in federal court confessing to the abduction and murder of Jacob Wetterling.

Heinrich testified that he jumped out of the car wearing a mask and holding a .38 revolver. He ordered them into a ditch and asked their names and ages. "I told Trevor (Jacob's brother) and Aaron (Jacob's best friend) to run away, don't look back or I'll shoot. " Heinrich recalled.

The defendant described how he then handcuffed Jacob and put him in the passenger seat of his car. Heinrich had a police scanner in his vehicle, and after hearing police respond to the kidnapping he decided he'd better drive back to his home in Paynesville. He recalled Jacob at one point asking him, "What did I do wrong?" At that point in the testimony, Jacob's sisters began audibly sobbing.

Heinrich described taking a series of back roads that wound through several small central Minnesota communities until he reached a sewage pond road and drove to a gravel pit by a grove of trees. There, he forced Jacob to disrobe and perform a sexual act on him until the boy told Heinrich he was cold.

Jacob Wetterling file photo
Jacob Wetterling file photo

Jacob asked to be taken home, and Heinrich became visually emotional as he recalled telling the boy it was "too far." On the way back to the car, Heinrich noticed a police cruiser on the road nearby. He said he panicked, pulled his revolver and put two rounds inside.

"I raised the revolver to his head, clicked once with no bullet in the chamber. Shot him twice after that," Heinrich admitted, firing into the back of Jacob's head after asking the boy to turn around so he could go to the bathroom.

The details got worse. Heinrich described how Jacob was still crying after the first shot, so he fired again. Family members wept at the cold recollection, putting their heads into their hands -- some visibly shaking.

After driving back to his home and staying for a couple of hours, Heinrich testified that he returned to the gravel pit and dragged Jacob's body approximately 100 yards to bury him. The defendant says his own shovel was too small so he stole one from the construction site. He then spotted a Bobcat digger with keys in it and used the machine to dig a large grave for Jacob.

When asked by a prosecutor if he returned to the burial site one year later, Heinrich said yes, and detailed how he dug up and collected Jacob's remains and put them in a garbage bag. He moved them to an unspecified site nearby. "Found a spot and dug a hole with a trenching tool about two feet deep. and put the bones in that hole and the jacket on top," he told the court.

Heinrich testified how he led authorities to that second site last week.

While official sentencing doesn't take place until November 21, the plea deal calls for Heinrich to serve 20 years in prison, the same length he would serve for the child porn charge alone. Federal sentences do not allow for parole, so he will serve the entire 20. The Wetterlings signed off on the deal, essentially trading immunity on murder charges to find out what happened to Jacob and bring him home.

"I want to say, Jacob, I'm so sorry. It's incredibly painful to know his last days, last hours, last minutes," said his mother, Patty Wetterling, during a news conference following the confession.

"We love you Jacob. We will continue to fight. Our hearts are hurting because for us, Jacob was alive... until we found him."

Heinrich would be 73 after serving a 20-year sentence. Judge Tunheim also said the defendant could be civilly committed as a sexual predator, if he lives beyond that sentence.

"On October 22, 1989, Danny Heinrich murdered a young boy. On that day, he stole our innocence. Today, he is facing justice," said U.S. Attorney Andrew Luger.

Prosecutors also had Heinrich detail how he kidnapped and sexually assaulted Jared Scheierl on January 13, 1989, just months before killing Jacob. He admitted keeping Jared's pants and underwear. When a prosecutor asked him "For what purpose?", Heinrich responded, "Souvenir, I guess."

"I was thrown into this investigation, not by choice, but because I was a victim," said Scheierl Tuesday afternoon. " A victim of an assault that, in so many ways, defined who I am today."

"If you would have asked me 25 years ago what my purpose in life was, I wouldn't have had an answer. If you would've asked by 18 years ago what my purpose in life was, I would have told you my daughter. Today, I'm in a moment of transcending or finding a new purpose in helping others gain closure…in what they need to move on, to move forward and to keep it positive," Scheierl added.

RELATED: Cold Spring victim talks about finding Jacob

Before addressing the Wetterling case Heinrich, who led investigators to Jacob's remains last week, pleaded guilty to a charge of receiving child pornography. The U.S. Attorney asked the court to dismiss the remaining charges against him. A federal prosecutor detailed the results of a search warrant that ended in the discovery of explicit images of children on the hard drive of Heinrich's computer. An image the defendant downloaded on March 1, 2014 is the basis for the only charge in the child pornography indictment he is pleading guilty to.

Before Chief Judge John Tunheim accepted the plea, he had Heinrich sworn in and questioned to make sure he was competent to make a decision with such gravity. The defendant testified that he has never been treated for any form of mental disease or addiction.

RELATED: Jacob Wetterling Resource Foundation