The verdict comes amid growing anti-immigration sentiments in Germany, including weeklong protests in the city of Chemnitz following the knifing murder of a German man of Cuban origin by alleged Middle Eastern migrants.

A juvenile court in the town of Landau, western Germany, handed down its verdict Monday in the case involving the asylum seeker, identified as one Abdul D, who claims to be a minor from Afghanistan. The defendant has confessed to stabbing his 15-year-old German girlfriend, Mia V. to death on December 27, 2017 with a kitchen knife at a drugstore in Kandel, a small town on the French-German border. He has confessed to the crime.

Prosecutors believe the defendant acted out of jealousy after the girl broke up with him, pointing to her and her parents' appeals to police over his harassment and threats. Authorities have also raised doubts about his age at the time of the crime, and his nationality.

Abdul D claimed he was 15 at the time of the crime, but a medical assessment by the prosecutor's office said it was likely that he was between 17 and 20 years old. Disregarding this assessment, the court proceedings were held under juvenile penal system rules, which hands out a maximum penalty of 10 years for murder.

The asylum-seeker came to Germany in April 2016. Abdul D's asylum request was rejected in February 2017, but he was not deported and remained in the country illegally.

The case, widely covered by German media, led to months of protests in Kandel, with opponents to Chancellor Angela Merkel's liberal immigration policy pointing to the case as evidence of its erroneous and dangerous nature.

Meanwhile, on the other side of the country, the eastern Germany city of Chemnitz has seen a week of protests after a 35-year-old German citizen of Cuban origin was fatally stabbed by two perpetrators believed to be of Iraqi and Syrian origin. The men were arrested on suspicion of murder.

On Sunday, German Foreign Minister Heiko Maas urged his fellow countrymen to resist the spread of what he called "xenophobia," "right-wing extremism and racism" amid growing anger over the government's perceived inaction against violence by migrants.

Also Sunday, a new report by the Federal Criminal Police Office pointed to a dramatic rise in the number of murder and manslaughter cases involving non-German suspects.