ISTANBUL -- Turkish police fired tear gas and rubber bullets to disperse demonstrators who gathered Sunday for a gay pride rally in Istanbul despite a government ban.

Dozens of LGBT demonstrators assembled off Istiklal Street, a major commercial artery, some brandishing the community's rainbow flag.

Police called on them to disperse and prevented activists from marching or making statements. A couple of individuals were detained.

Get Breaking News Delivered to Your Inbox

More than 300 policemen in anti-riot gear and backed by water cannons were deployed along the pedestrian thoroughfare and side streets.

People react as they watch Turkish anti-riot police officers fire rubber bullets to disperse demonstrators gathered for a rally staged by the LGBT community on Istiklal avenue in Istanbul, June 19, 2016. Getty

Istanbul's governor had banned gay, lesbian and transgender individuals from holding two annual parades this year citing security concerns.

Istanbul has witnessed a series of deadly bombings in the past year, including two suicide attacks targeting tourists -- one on Istiklal Street.

On Friday, Istanbul pride week organizers issued a statement with a #LoveWillWin hashtag in Turkish rejecting security concerns as a reason to ban the parades.

It said "the governorship prefers to limit people's rights and freedoms instead of taking measures to deal with the threats."