By Daria Sito-Sucic

SARAJEVO (Reuters) - Bosnia's first Gay Pride march on Sunday will be protected by a major security operation after some conservative Muslim groups had attempted to prevent the event and others organised counter-rallies.

Although opponents of the march in capital Sarajevo have called for peaceful protests, the authorities are nervous that fringe groups or youths could engage in violence in a country where anti-gay sentiment can often be heard in public.

More than 1,000 police officers will secure the event which will be attended by the U.S. ambassador to Bosnia, who is gay, and his partner. Anti-sniper units will be placed on the roofs of buildings along the main route in the city centre.

An additional 150 security guards will also be deployed, the organisers said.

Although homosexuality is legal in Bosnia, queer festivals held in 2008 and 2014 in Sarajevo were attacked by Islamist radicals and hooligans and the LGBTI community has largely been in hiding since then. There are no gay bars or places where LGBT people can openly meet.

Ethnically-divided Bosnia went through a devastating war in the 1990s, but organisers say people from across the divides have joined forces to protest against homophobia and discrimination which is widespread in the Balkans and often fuelled by religious leaders and right-wing political parties.

Bosnia is the last Balkan country to hold a Pride parade, seen as a test of tolerance of minority rights as it seeks to join the European Union. After North Macedonia held its first Pride in June, it is now Bosnia's turn, organisers say.

"We have planned the march for a long time, there has been need for it for a long time and we think this is the right moment to organise it," said Ena Bavcic, one of the organisers.

"LGBT people in Bosnia are much more hidden when compared to other countries of the region and fear more to go out in public," Bavcic said of the parade, to be held under the slogan "Ima Izac" or "I Want Out".

"The march will help people to realise that we exist, that we are here, that we are humans," she added.

Before the war in which 100,000 died, Sarajevo was known as a multi-ethnic city in which four religious communities - Orthodox and Catholic Christians, Muslims and Jews - had lived together for centuries.

But after the 1992-95 siege by Bosnian Serb forces, its population became predominantly Muslim Bosniak.

Sarajevo cantonal Prime Minister Edin Forto supports the event but security is tight after some conservative Bosniak parties had criticised the parade and called for its cancellation. The Orthodox and Catholic churches are also strongly opposed.

A group of conservative non-government organisations have announced a separate march on Saturday promoting "traditional family values". Another group, led by an Islamic scholar, said it would gather for a counter-rally on Sunday.

"We advocate diametrically opposite attitudes," Ahmed Kulanic, spokesman for an initiative which says it seeks to preserve the traditional family, said of the Pride march.

Both groups dismissed a possibility of violence.

The march has been supported by EU diplomats and activists from the region and beyond. Eric Nelson, the U.S Ambassador to Bosnia, said he and his partner would take part in the parade in support of all LGBT people and their families.

Posters featuring anti-gay slurs were put up on walls near the U.S. Embassy on Friday.

"Sarajevo has long been viewed as a city of tolerance and its positive reputation will indeed be tested by a new generation of post-war queer youth who refuse to remain invisible," said Tanya Domi, a human rights professor at Hunter College in New York, who travelled to Sarajevo for the event.

(Reporting by Daria Sito-Sucic; Editing by Toby Chopra)