Istanbul (CNN) Tear gas and rubber pellets marred Pride rallies in Istanbul Sunday as LGBTQ supporters took to the streets in defiance of a parade ban.

The Istanbul governor's office enforced the ban for the third year in a row, citing security concerns.

"The march will not be allowed for the safety of our citizens, first and foremost the participants, and tourists who are in the area visiting," the governorship said in a statement.

But revelers were undeterred from attempting to participate in the global day of LGBTQ celebrations despite recent episodes of violent homophobia in the country.

They encountered heavy police presence along Istanbul's main commercial street, where the parade was supposed to take place. Istanbul's Pride organizers said at least 20 people were arrested.

Riot police closed off entrances to the parade route with water cannons. Crowds in Taksim Square chanted "Where are you my love? / I am here my love!" as police used tear gas and rubber pellets to break up the crowd.

LGBT supporters run from tear gas fired by police after attempting to march to Taksim Square.

Guests at a nearby cafe whistled in protest as police detained a paradegoer, prompting riot police to tear through tables and chairs to clear out the crowd.

The crowds flocked to small neighborhoods, dancing and chanting, but were soon dispersed by police.

Pride organizers said the crackdown was about intolerance and not security. They called it another facet of Turkey's creeping authoritarianism under the ruling Justice and Development Party, or AKP.

Riot police detain LGBTQ supporters in Istanbul.

Although homosexuality has been legal in Turkey since 1923, the country has one of the worst records of human rights violations against LGBTQ people in Europe, and Turkey's LGBTQ community has been increasingly vocal about violence against members of the community.

Organizers said they were hopeful that the parade would be allowed to go ahead this year because it fell on the first day of Eid. In the past two years, the parade date overlapped with Ramadan, the holy month during which Muslims fast.

The far right Islamist Alperen group issued a threat several days before the parade.

Turkish riot police officers block activists as they try to gather for the pride parade.

"We will not allow this march which calls itself a pride march but in reality is normalizing and encourging immorality and tawdryness that touches the nerves of society," the statement said.