ISTANBUL, May 1 (Xinhua/Sun) -- Fifty protesters were injured and 138 detained in clashes with police as trade union members tried to stage an anti-government rally in Istanbul's central Taksim Square on May Day, authorities said.

Riot police fired tear gas, rubber bullets and water cannon on protesters who defied an official ban to march toward the iconic Taksim.

Thousands of people gathered at different places of the city early Thursday morning in preparation for the march toward Taksim. The main gathering spots were in front of Turkey's biggest labor union headquarters in Sisli and Besiktas, districts next to Taksim.

Waving trade union flags, the crowd shouted anti-government slogans and carried banners reading "Damn the AKP (Ruling Justice and Development Party) and its authoritative regime."

Riot police dispersed the crowds by firing tear gas and water cannons. Some protesters responded by setting off fireworks and throwing stones.

Some Twitter accounts of the protests have claimed that residents of Besiktas district were distributing gas masks and lemons to demonstrators counteract the effects of gas. In Istanbul 's Okmeydan neighborhood, a group of protesters, believed to be members of an illegal group, clashed with riot police in the early hours of Thursday.

The group attacked police with Molotov cocktails and fireworks. An armored police vehicle was set on fire. Police responded with tear gas.

The Istanbul Governor's Office had earlier issued warnings against Labor Day demonstrations on Taksim Square, but trade unions insist on their right to gather at the iconic square.

The Governor's Office attributed the decision to block Taksim Square and many adjacent roads to intelligence reports that " illegal terrorist groups" would resort to violence against security forces.

It said 40,000 police would be deployed in Istanbul, and 19,000 of them would be on duty in Taksim, with 50 water cannon trucks and armored vehicles at the ready.

The Confederation of Progressive Trade Unions and others said earlier that they were determined to march to Taksim despite the ban that they believe to be incompatible with previous rulings from the European Court of Human Rights ensuring freedom of assembly.

They said about 500,000 people were expected to gather in Taksim Square on May 1.

By midday, most large groups of protesters had reportedly been dispersed into side streets around the Taksim and Besiktas areas and that police had cleared makeshift barricades set up by some demonstrators.

However, protesters in the Tarlabasi district said further violence was expected after nightfall.

Besides Istanbul, activists have announced plans for May Day demonstrations in more than 30 other provinces, including the capital Ankara.

Turkey has a total of 81 provinces, Istanbul and Ankara are among the largest ones.

May Day rallies on Taksim proceeded with no incidents in 2010, 2011 and 2012, but the square was condoned off on May 1, 2013, by the government, citing on-going construction in the area.

Taksim Square has a symbolic and historic meaning as 37 people were killed in 1977 during May Day clashes.