Image copyright AP Image caption The abduction of Jacob Wetterling was unsolved for almost 27 years

A man who admitted abducting and killing an 11-year-old boy in the US state of Minnesota nearly 27 years ago has been jailed for 20 years on a child pornography charge.

In September, Danny Heinrich, 53, led investigators to the remains of Jacob Wetterling, buried in a field.

As part of a plea deal he faced no charges for the boy's death.

The sentence handed down at the federal court in Minneapolis was the maximum the law allowed.

Image copyright AP Image caption Danny Heinrich admitted killing Jacob Wetterling as part of a plea deal

At an emotional court hearing on Monday, Heinrich apologised to the Wetterling family, saying he was "truly sorry for the evil acts".

He told Jacob's parents and siblings his actions were "heinous" and "unforgivable".

Although Heinrich could be eligible for release after 17 years, state authorities could find ways to prevent him from ever going free, US media report.

Jacob Wetterling was abducted by a masked gunman in 1989 cycling home from a video store with his brother and a friend in the city of St Joseph.

Heinrich was questioned early in the investigation but maintained his innocence. He was named a person of interest in October 2015 when authorities re-examined the case on its 25th anniversary.

A search of Heinrich's home in Annandale last year found child pornography.

Image copyright AP Image caption Jacob's parents, Jerry and Patty Wetterling, campaigned for other missing children

In a deal with prosecutors, Heinrich agreed to admit one count of receiving child pornography with a sentence of 20 years in exchange for revealing the whereabouts of Jacob Wetterling.

In a chilling court appearance in September, Heinrich gave details of the abduction and killing.

With his victim's parents looking on, Heinrich said that when he had dragged the boy into his car, Jacob had asked: "What did I do wrong?"

He said he had driven the boy to a gravel pit, assaulted him and then shot him in the head.

After his abduction, Jacob's mother, Patty Wetterling, became an advocate for missing children.

She and husband Jerry set up the Jacob Wetterling Resource Center, which aims to prevent the exploitation of children.

In 1994, Congress passed laws bearing Jacob Wetterling's name that require states to establish sex offender registries.