ISTANBUL (AP) — Turkey's lesbian, gay, bisexual, trans and intersex activists gathered Sunday for an LGBTI pride march in Istanbul, moving from street to street for an hour as police tried to end an event the local government had banned for the fourth year in a row.

Hundreds of people chanted slogans and waved rainbow flags on side streets along Istiklal Avenue, Istanbul's main pedestrian thoroughfare. The organizers released a statement saying the city's ban would not deter them from marching peacefully.

Despite the ban, police allowed the organizers to read a press statement. "We do not recognize this ban," the group said in the statement read out loud by a volunteer, calling the prohibition imposed by Istanbul's governor "comical."

Police told the crowd to disperse after the statement, warning "otherwise, we will intervene." Officers patrolled with dogs and had water cannons stationed nearby.

They fired tear gas on groups in some areas and were seen elsewhere pushing and shouting at participants who were too slow to scatter.

March organizers said Friday that the governor had prohibited the march in violation of the right to freedom of assembly.

The governor has cited security reasons and public "sensitivities" as grounds for barring LGBTI marches since 2015. Prior to that, Turkish authorities had allowed pride marches since the first one took place in 2003. As many as 100,000 people attended Istanbul Pride in 2014.

While police tried to disperse Sunday's march, participants kept reassembling in clusters different parts of the city's Taksim district, chanting "Don't be silent, shout out, homosexuals exist."

Another activist read from the statement that the march organizers also circulated online and said, "We miss the marches attended by thousands where we celebrate our visibility."

On Thursday, the governor in Turkey's capital city of Ankara, citing the need to protect "public order," banned a screening of "Pride," a Golden Globe-nominated film about gay activists in the United Kingdom. The prohibition on the movie followed a blanket ban issued in November on LGBTI events in Ankara.

Although homosexuality and being transgender are not illegal in Turkey, LGBTI people face discrimination and hate crimes.

Yasemin Oz, an activist and lawyer, told The Associated Press that transgender and gay people were "ostracized and discriminated against" in accessing education, health care and employment.

LGBTI individuals need to "go out to the streets, show themselves, say 'We are here, we are among you,'" if they are to be accepted by society, Oz said.

The Turkish government denies that individuals are discriminated against based on gender identity or sexual orientation and says current laws are sufficient to protect the rights of every citizen. The government says perpetrators of anti-LGBTI hate crimes are prosecuted.

Turkey has been under a state of emergency for nearly two years following a failed coup attempt, which allows authorities to curtail some freedoms.

___

Associated Press journalist Yagmur Cengiz in Istanbul contributed.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.