A German court Monday jailed a failed asylum seeker who claims to be from Afghanistan for stabbing his 15-year-old ex-girlfriend to death, in a case the far-right has seized upon in its campaign against migrants.

The defendant, identified only as Abdul D., received a jail term of eight and a half years from the juvenile court in the western town of Landau.

The verdict came a week after violent anti-immigrant protests erupted in the eastern city of Chemnitz over the fatal stabbing of a man, allegedly by a Syrian and an Iraqi.

Abdul D. had admitted to the court to stabbing the girl at a drugstore in the town of Kandel on December 27. Prosecutors believe he acted out of jealousy after the girl broke up with him.

Besides his nationality, doubts have been raised about his age, which he said was 15 at the time of the crime.

An expert had estimated his age as between 17 and a half and 20 but, given the uncertainty, the proceedings were held behind closed doors and under juvenile penal rules.

Abdul D. arrived in Germany in April 2016 and his request for asylum was rejected in February 2017 although he was not immediately deported.

The case is one in a string of high-profile crimes allegedly committed by asylum seekers that have stoked popular anger against the new arrivals and put pressure on Chancellor Angela Merkel over her liberal refugee policy.

- 'Intolerable' -

Far-right party AfD has been mobilising regular demonstrations over the killing in the small town with a population of just 9,000, as it has sought to bolster its anti-migrant campaign.

At the peak of the protests, thousands marched in Kandel, but the rallies have since lost momentum. On Saturday, a demonstration in the town attracted 350 people, local police said.

Residents of the small town frustrated by the far-right rallies also lined the demonstration route, carrying banners like "Stop hate and incitement" or "Kandel is colourful, not brown" -- in reference to the Nazi's khaki uniforms.

Rhineland-Palatinate state premier Malu Dreyer accused the far-right of exploiting the teenager's death for political gains, saying this was "intolerable".

"It is the hope of all of us that once the trial is over, peace will return to Kandel," she said.

- 'More of us' -

Across the country in Chemnitz, in the formerly communist east, tensions have been running high over another stabbing case.

Rival rallies in the eastern city on Saturday drew 11,000, with far-right demonstrators outnumbering counter-protesters by 8,000 to 3,000, police said.

Eighteen people were reported injured, police said, with a Social Democrat MP also saying that his team was "attacked by Nazis" as they were heading towards their bus.

Resentment against the arrival of more than a million asylum seekers since 2015 is particularly strong in Saxony state, where Chemnitz is located.

The AfD, railing against asylum seekers, has won strong support in the state, and surveys suggest that it is poised to become Saxony's second biggest party in next year's regional elections.

On Sunday, Foreign Minister Heiko Maas urged Germans to "get off our sofas and open our mouths" against xenophobia.

"All of us have to show the world that we democrats are the majority and the racists are the minority," he told Bild am Sonntag.

"The silent majority must get louder."

Later Monday, several left-leaning and anti-fascist punk bands were expected to attract thousands for a free concert in Chemnitz to protest the racist violence there, held under the motto "there are more of us".