Turkish police fired tear gas and water cannon at hundreds of stone-throwing May Day protesters on Friday, after they defied a ban and tried to march on Istanbul's Taksim Square.
Europe's biggest city was under a security lockdown as thousands of police manned barricades and closed streets to stop demonstrations at Taksim, a traditional rallying ground for leftists that saw weeks of unrest in 2013.
Riot police unleashed water cannon and chased protesters down side streets in the nearby Besiktas neighborhood, where they fired off canisters of tear gas, according to a Reuters reporter at the scene. Demonstrators lobbed stones and bottles at police and set off fireworks.
Istanbul police said that nearly 140 people had been detained, although activists said the number was nearly double that. By afternoon most of the protests had been broken up and demonstrators drifted away.
Critics say President Tayyip Erdogan and the government have become more authoritarian in the buildup to June elections.
"People want to express their problems but the government doesn't want those problems to be heard ahead of elections," opposition politician Mahmut Tanal, holding a pocket-sized book of the Turkish constitution, told Reuters in Besiktas.
The normally thronged Istiklal shopping avenue leading to Taksim was deserted, with shops shuttered and metal barricades blocking off side streets. Police helicopters circled overhead.
A usually bustling square lined with cafes and hotels, Taksim was filled with police buses, ambulances and satellite broadcast trucks. A pair of tourists emerged from a hotel to find the area sealed off and nervously made their way around police lines.
Much of Istanbul's public transport had been shut down due to security concerns, and police helicopters circled over the city. Tens of thousands also gathered to march in the capital Ankara, where the mood was more festive, with dancing and singing.
The government had said Taksim would only be open to those who came peacefully and not for "illegal demonstrations".
"I wish May 1 to be celebrated in a festive mood without provocations," Erdogan said in a statement.
Opposition parties and unions called on the government to lift the ban.
Erdogan has previously dismissed protesters as "riff-raff" and terrorists, outraged by the unrest in 2013 that brought unwanted international attention and posed the biggest challenge to his AK Party since it came to power in 2002.
He is aiming for a massive victory for the party in June parliamentary polls, which would allow it to change the constitution and give him broad presidential powers.
The 2013 Taksim protests began as a peaceful demonstration against plans to redevelop Gezi Park, a leafy corner of the square. After a police crackdown the demonstration spiraled into weeks of nationwide protests against Erdogan's rule.