A German man who took part in a gay rights conference suffered life-threatening brain injuries when he was severely beaten in downtown Belgrade on Saturday, Serbian police and gay activists said.

The identity of the 27-year-old man has not been released.

Jovanka Todorovic, from the Labris gay and lesbian group, told The Associated Press that the man was attacked early morning by a group of young men who beat him with a glass ashtray and shouted: "We don't want foreigners in Belgrade!"

Doctors at Belgrade's emergency hospital said the man suffered internal bleeding and head injuries.

"He had a surgery and his condition is serious," said Dusan Jovanovic, deputy director of the hospital.

Serbia, which has a long history of attacks by far-right groups against gay activists, has repeatedly pledged to protect human rights as it seeks European Union membership.

Protesting the attack, hundreds of gay rights supporters marched in downtown Belgrade on Saturday carrying signs "Stop the Violence" and "Your Policies, Our Blood." A heavy anti-riot police force presence protected the demonstrators.

"If it's true that the attacker said that he does not want foreigners in Serbia, that gives a new xenophobic dimension to the whole incident," German Ambassador to Serbia Heinz Georg Wilhelm said.

Serbia's Interior Minister Nebojsa Stefanovic pledged that police will identify the attackers. "I ordered an intensive investigation so the attackers are brought to justice soonest," he said, adding that foreigners are welcome in Serbia.