BELGRADE, Serbia (AP) - Hundreds attending a tightly-secured gay pride event on Sunday in Serbia called for solidarity with tens of thousands of migrants passing through the Balkan country in search of a new life in Western Europe.

The colorful pride march was held in the capital, Belgrade, thanks to thousands of riot police in full gear deployed in the downtown area to protect the gathering from right-wing extremists and soccer hooligans.

Police have detained several extremists for planning to attack the event. In 2010 extremist groups and soccer hooligans attacked another gay pride gathering in the conservative Balkan country, triggering clashes that left more than 100 people injured.

Anti-gay sentiments are high in the traditionally macho culture, but government has pledged to boost human rights as the country seeks membership in the European Union. Opponents include the Serbian Orthodox Church, whose priests have taken part in anti-gay marches.

One of the pride organizers Goran Miletic said Sunday that he regretted the event had to be guarded by police and "that we have to fight for our rights this way."

Activists at Sunday's pride in Belgrade said migrants, like gays, were seeking their basic human rights to be able to live and work freely. A black-and-pink banner read "Europe, Open Your Gate" to the men, woman and children fleeing war and poverty.

"We feel for our friends in trouble," said liberal playwright Biljana Srbljanovic. "Let's reach out to them and give them hope they, like us, will fulfill their rights."

Thousands of migrants from Syria, Afghanistan and other troubled countries of the Middle East, Africa or Asia have passed through the Serbian capital in the past months, many camping in parks in the open.