Istanbul (AFP) - Turkish police on Sunday prevented an attempt by Gay Pride activists to hold a parade in Istanbul, the country's largest city, in defiance of an official ban by the local authorities.

Police fired rubber bullets at a group of around 40 activists, an AFP journalist reported, a day after the city governor's office banned the march citing safety and public order concerns.

Small groups gathered at Taksim Square but witnesses said there was a heavy police presence which outnumbered the activists, and at least four people were detained.

It is the third year in a row that the march has been banned, and organisers denounced the move.

"We are not scared, we are here, we will not change," the Pride Committee said in a statement. "You are scared ... you will get used to it.

"We are here again to show that we will fight in a determined fashion for our pride."

Istanbul city authorities banned the parade also after threats from far-right and conservative groups.

At Taksim Square, some nationalist groups opposed to the march shouted verbal attacks at LGBT activists who were singing in a show of protest, with one man telling a protester to "Shut up!".

But they were taken away by the police.

"We represent the colours of the rainbow and will definitely defeat the darkness," activist Deniz Tunc told AFP.

"Bans, violence cannot intimidate us. We will continue to defend peace, equality and co-existence and that's why we are on the streets."

A French tourist who gave her name as Carole said she wanted to participate in the parade but could not.

"I believe in the LGBT community with all my heart," she told AFP, wearing a hairpin in the colours of the rainbow.

She called the ban "nonsense" and said: "Everybody deserves equal rights."

- 'Governors change, we stay'-

In one of the biggest LGBT events in the mainly Muslim region, the 2014 Gay Pride parade in Istanbul drew tens of thousands of people.

Last year, with the city on edge after bombings blamed on the Islamic State group and Kurdish militants, organisers were denied permission to march.

Story continues

Riot police fired tear gas and rubber bullets to disperse protesters who defied the ban.

Eleven activists went on trial in Istanbul this week for defying last year's ban on the Gay Pride march, but they were all acquitted.

This year, the parade coincided with the first day of Eid, the festival marking the end of the holy Muslim fasting month of Ramadan.

Critics accuse President Recep Tayyip Erdogan of having overseen a creeping Islamisation since he came to power, first as prime minister in 2003 and then president in 2014.

He has repeatedly infuriated activists with his conservative comments on sex and family planning, but has generally steered clear of commenting publicly on gay issues.

But in 2010, former family minister Aliye Kavaf, a woman, described homosexuality as a "biological disorder" and a "disease".

Homosexuality has been legal in Turkey throughout the period of the modern republic but gay people in Turkey regularly complain of harassment and abuse.

"We are not alone, we are not wrong, we have not given up," the Pride Committee's statement said Sunday.

"Governors, governments, states change and we stay. Threats, bans, pressures will not deter us ... We will not give up on," it added.

Related:

For more news videos visit Yahoo View, available on iOS and Android.