BERLIN (AP) _ Three young Germans who led a drunken neo-Nazi mob on a ''hunt for foreigners,'' chasing Africans and trashing a Turkish-run cafe, were sentenced to up to three years in jail Tuesday.

The May 12 riot in the eastern city of Magdeburg was Germany's worst right- wing violence this year. The trial was marked by frequent disruptive and threatening outbursts by young toughs in the gallery.

Heiko Kahle, a carpenter's apprentice; Steffen Schuette, a waiter; and Carlo Felgentraeger, a railway worker, were convicted of inciting the rampage and sentenced to terms ranging from 25 to 36 months.

Chief Judge Ludwig Fabricius deplored that ''foreigners were chased through the streets like animals'' by a mob of 30 to 40 youths led by the defendants.

Fabricius said the stiff sentences were meant to send a message to ''other potential troublemakers, especially from this circle.''

Defense lawyers had asked for suspended sentences. But German judges have begun to get tougher with violent young rightists.

The defendants had recanted jailhouse confessions in a tense courtroom where young spectators shouted threats at prosecution witnesses.

It was the second trial in the May 12 riot. Last month, a juvenile court sentenced three youthful participants to up to 3 1/2 years in prison.

Shouting ''Hooligans for Germany 3/8'' and ''Smash the Foreigners 3/8'' and drunk on beer, the mob went in search of a group of Turks who they said insulted them at a soccer match two weeks earlier.

They first encountered some African men, whom they chased through a city center packed with pedestrians.

The Africans fled into the Turkish-run Marietta Bar and the neo-Nazis stormed in, breaking windows and turning over tables.

The Turks defended the Africans and their establishment with knives, wounding three of the attackers.

Police were accused of not reacting quickly enough to stop the violence, which escalated after nightfall with right-wing vandalism and street fighting among skinheads, foreigners and radical leftists.

Two police officers were suspended for arresting and allegedly beating up two foreigners during the violence.