Turkish riot police have used tear-gas grenades and water cannon to disperse more than 2,000 people demonstrating against new internet restrictions that have caused concern both at home and abroad.
Large numbers of police with body armour and shields backed up by armoured water-cannon lorries deployed against the chanting, mostly young crowd around Istanbul's Taksim Square on Saturday.
The demonstrators hurled fireworks and stones at police officers who had cordoned off the public square, and smashed windows and sprayed graffiti on buildings.
Many also denounced a corruption scandal involving former cabinet ministers and called on the government to resign.
The president, Abdullah Gul, is under pressure not to ratify the legislation, passed on Wednesday by parliament, which would allow authorities to block websites for privacy violation without a court decision.
Internet providers would also be forced to keep users' data and make it available to authorities.
Recep Tayyip Erdogan, Turkey's prime minister since 2008, has rejected accusations of censorship, insisting the legislation would make the internet "more safe and free".
Addressing a crowd of several thousand supporters in Istanbul on Saturday, he said: "These regulations do not impose any censorship at all on the internet. On the contrary, they make it safer and freer."
He also denied that authorities would now have access to internet users' personal information.
"Never. It is out of the question that people's private data will be recorded," Erdogan said.
Critics of the restrictions say they are an attempt by Erdogan, 59, to stifle dissent and stop evidence of high-level corruption being seen online.
The timing in particular raised eyebrows because it comes as Erdogan deals with the corruption scandal implicating his inner circle.
Human Rights Watch said the restrictions raised concerns that a "defensive government is seeking to increase its power to silence critics and to arbitrarily limit politically damaging material online".
Martin Schulz, European Parliament chief, called them a "step back in an already suffocating environment for media freedom", while the US also expressed misgivings.
Gulen plot alleged
Erdogan has portrayed the investigation as a plot against him by people within the Turkish police and judiciary loyal to Fethullah Gulen, an Islamic preacher living in the US.
His government has sacked or moved to different jobs thousands of police and prosecutors in advance of important local elections on March 30 which could determine whether he runs for president in August.
An Azeri journalist and blogger was deported on Friday from Turkey because of his messages on Twitter criticising the government, according to his newspaper, Zaman, which is close to Gulen.
The Organisation for Security and Cooperation in Europe said that Mahir Zeynalov's ejection was "a further setback for the dire state of media freedom in Turkey".
US-based rights group Freedom House said that over the past year "dozens of journalists have been fired because of government pressure, and government officials' threats against journalists have become common".
Erdogan is also seeking to push through legislation reforming the judiciary, which critics will say will increase government control.