Three man who attacked a kebab shop at train station near Munich in 2015 were handed prison sentences on Thursday by a local court.
Three other defendants were given suspended sentences at the Munich Court of Appeals, with two given additional fines.
On September 25, 2015, the group stormed the imbiss at the Ebersberg station with a baseball bat, a curtain rod and a hammer, injuring two Afghans and smashing several windows.
The two main perpetrators, aged 36 and 28, were sentenced to four years and three months, and two years and four months, respectively. They have been charged with forming armed groups, grievous bodily harm, incitement, threats and property damage.
Another 28-year-old, who has nine previous convictions and is already serving a prison sentence for another case, must serve another 14 months.
The court's sentences are not yet legally binding.
The presiding judge said that the men were not proponents of radical right-wing ideologies, but had committed mindless xenophobic acts. "This is the worst. This is the mob in our society," said the judge.
Following a visit to Oktoberfest, the two main perpetrators had shouted insults against Africans and attempted to attack a man. Once at the railway station, they punched another man in the head.
After arriving at home, they told friends that they had been attacked by foreigners and wanted to take revenge. The group then armed themselves and went to the kebab stand, which four of the men stormed while the others waited outside.