Thomas O., appeared in court after more than 26 years charged with murdering nine-year-old schoolgirl Christina in November 1987 in Osnabrück, Lower Saxony.
He snatched the child while he was out jogging and tried to rape her in an overgrown garden. When she threatened to tell her mother about the abuse, he killed her, the court heard.
He was a suspect at the time of the murder but had an alibi. However, he was caught last year thanks to a DNA match found on the victim's clothes.
An Osnabrück court convicted Thomas O. as a minor, as he was 19 when the crime took place.
Prosecutors had called for eight years in jail, while his defence argued for six-and-a-half.
SEE ALSO: Woman, 71, jailed for stalking priest