ISTANBUL (Reuters) - Turkish police said they detained 137 people in Istanbul on Wednesday for trying to hold illegal demonstrations in various parts of the city to celebrate May Day.

Police had cordoned off Istanbul's central Taksim square, but small groups of demonstrators converged there anyway.

"Squares belong to the people, they cannot be closed off. Long live May 1!" protesters shouted as police hauled them away, covering their mouths.

Protests for May Day, the international workers' holiday, are an annual occurrence in Turkey and have in the past been characterized by police action against demonstrators. Protests have often centered on Taksim Square where 34 people were killed during demonstrations on May 1, 1977.

Turkish police regularly prevent the staging of protests in central Istanbul and elsewhere. Ankara tightened restrictions after the imposition of emergency rule following an attempted coup in 2016. The state of emergency was lifted last July.

Earlier on Wednesday, police allowed a ceremony by a few union leaders to go ahead in Taksim Square, and another group laid carnations on a street nearby.

Authorities only allowed mass celebrations in the Bakirkoy district, located some distance from the city center.

By 1600 GMT, Istanbul police said they had detained 137 demonstrators in various parts of Istanbul, including the central districts of Besiktas, Sisli and Beyoglu.

In Besiktas a small group of protesters began shouting slogans and waving red flags of the leftist People's Liberation Party (HKP). Television footage showed police scuffling with protesters, rounding some up and putting them in police vans.

Ozgur Karabulut, general manager of Dev Yapi-Is Union, said the celebrations were continuing smoothly in Bakirkoy, with participants from all parts of society.

The Interior Ministry said some 303,000 people had participated in 138 legal May Day events around Turkey.

(Reporting by Murad Sezer, Ali Kucukgocmen, Ece Toksabay and Bulent Usta; Editing by Mark Heinrich)