Istanbul (AFP) - Riot police in Istanbul used teargas and fired rubber pellets to disperse thousands of participants in the city's Gay Pride march after some began chanting slogans against the president, an AFP reporter said.

The scene turned violent when participants -- many brandishing rainbow flags -- denounced "the fascism" of the conservative President Recep Tayyip Erdogan.

Police then began to forcefully break up the crowd, with some officers firing rubber pellets into the crowd.

On a fraught day, pro-government protesters attacked a group of journalists covering the event, including an AFP photographer, causing minor injuries.

According to witnesses and the media, police did nothing to stop the attack.

Another AFP journalist said she was assaulted by officers when she tried to film the police intervention.

Before the march, police closed off access to Taksim Square, the scene of anti-government protests in 2013 -- since which all demonstrations in the area have been banned.

This is the 13th edition of the Gay Pride parade in Turkey, which has been held in the past without major incident.