Turkish police have fired tear gas to disperse hundreds of protesters in Istanbul's central Taksim Square.
The protesters were demonstrating mainly against a government bill that would increase controls over the internet.
Protesters were reported to have been forced to escape into side streets after police used water cannon and tear gas.
Smaller demonstrations also took place in the coastal city of Izmir and in the capital, Ankara.
About 300 protesters chanted slogans opposing the government and the internet bill.
The draft law that is to be debated in parliament in the coming days would allow the government to block websites without seeking a court order.
It would also enable mass surveillance of internet users.
The Turkish government said the bill was aimed at protecting people's privacy and protecting children from internet predators.
Protesters gathered on Istanbul's Taksim Square chanted anti-government slogans and called on the lawmakers to reject the bill.
Scuffles broke out as riot police detained several protesters.
Turkish Prime Minister Tayyip Erdogan faces a crisis unprecedented during his 11 years in office due to a graft scandal.
The scandal has forced the resignation of three ministers and a cabinet reshuffle, as well as destabilising the Turkish economy whose rapid growth has been a showpiece of his rule.
While police tried to prevent anti-Erdogan crowds from forming on Taksim, cheering supporters of the ruling AK Party welcomed him at Istanbul airport about 20km away, waving party and national flags when he returned from a trip to the provinces.