Hussein Khavari, of uncertain age and origin, was found guilty of the deadly night-time attack on medical student Maria Ladenburger, 19, in October 2016 in the university town of Freiburg.
Khavari pushed her off her bicycle as she was riding home alone from a party, then bit, choked and repeatedly raped her and left her on the bank of a river where she drowned.
Presiding judge Kathrin Schenk condemned the extreme “lack of empathy” of Khavari, who was handcuffed and wearing a black hooded jumper, before reading out the verdict and sentence, which were greeted with applause in the courtroom.
She handed down the maximum sentence of life in prison, which under German law means 15 years behind bars, with no chance of parole and the possibility of “security detention” afterwards if the convict is still deemed to pose a threat to society.
Schenk said she saw almost no chance of rehabilitation, telling Khavari that “you would have to become an entirely different human being”.
Khavari had been arrested seven weeks after the murder, following a huge manhunt in the town near the French border.
Police had found a black hair partially dyed blond at the scene, then spotted Khavari by his hairstyle on security camera footage and linked him to the crime using his DNA.
As the crime sparked public anger and revulsion, social media users posted sarcastic “thank you” messages to Chancellor Angela Merkel over her liberal policy that brought more than one million refugees and migrants to the country.
During the trial, prosecutor Eckart Berger had reminded the two jurors sitting alongside three judges that “on trial is a criminal offender and not Germany's refugee policy”.
Jailed in Greece
Khavari arrived in Germany, without identity papers, in November 2015, near the peak of the refugee influx, as an unaccompanied minor claiming to be 16 or 17 years old and hailing from Afghanistan.
A police officer told the court that Khavari's cellphone and social media accounts suggested he had lived in Iran.
Khavari was sent to live with a German host family in the picturesque town on the edge of the Black Forest, went to a local school, learnt German and received state benefits.
It emerged only after his arrest that he had already committed a violent crime in May 2013 in Greece, where he pushed a woman off a cliff on the island of Corfu, leaving her badly injured.
He was sentenced there in February 2014 to 10 years jail for attempted murder but was granted a conditional release from Greece's overcrowded jails in October 2015.
He fled to Germany, where authorities knew nothing of his criminal past because Greece had only issued a nationwide warrant, and because no match was detected in an EU-wide fingerprint database for asylum seekers.
Khavari was initially tried as a juvenile offender, but the court accepted expert opinions, based on X-rays and dental analysis, that he is now aged between 22 and 29.
The defendant had admitted to the crime, but claimed diminished culpability because he was under the influence of alcohol and drugs — a position which his defence said it would argue again in an appeal.
Khavari had also claimed that his father died long ago in a battle against Afghanistan's Taliban.
Judge Schenk in December dialled a number on Khavari's cellphone and reached his father, who told her through an interpreter that he was living in Iran.