Turkish President Abdullah Gul has called for dialogue with legitimate demonstrators against the redevelopment of an Istanbul park.

However, he said those who had taken to the streets in violent protests were a different matter.

Mr Gul spoke a day after riot police fired tear gas and water cannon almost without a break for more than 18 hours to clear thousands of people from Taksim Square.

The square has been the focus of nearly two weeks of protest against Prime Minister Tayyip Erdogan, who has repeatedly dismissed the demonstrators as "riff-raff".

Mr Erdogan is expected to meet a group of public figures to discuss the unrest, which began as a peaceful campaign against plans to build on Gezi Park next to the square.

"If people have objections ... then to engage in a dialogue with these people, to hear out what they say is no doubt our duty," Mr Gul told reporters during a trip to the coastal Black Sea city of Rize.

But he said violence on the streets would not be tolerated.

"Those who employ violence are something different and we have to distinguish them ... We must not give violence a chance ... This would not be allowed in New York, this would not be allowed in Berlin," Mr Gul said.

Police fired volleys of tear gas canisters into the centre of a crowd of thousands on Taksim Square without warning at dusk.

The crowd included people in office clothes gathered after work and families with children, as well as youths in masks who had fought skirmishes throughout the day.

Clouds of choking tear gas sent them scattering into side streets.

Municipal workers later used bulldozers to remove the remains of vandalised vehicles and clear the square.

Staff in surrounding hotels raised shutters just enough to allow people to crawl inside for shelter, as water cannon swept across the square targeting stone-throwing youths.

The fierce crackdown on the initial protests against the planned redevelopment of the park drew international condemnation and calls for restraint.

The latest police move came a day after Mr Erdogan agreed to meet protest leaders involved in the initial demonstrations.

"There's no room for dialogue when there's ongoing violence," said Mucella Yapici of the Taksim Solidarity Platform, a core group behind the Gezi Park campaign.

Groups of demonstrators taunted police in the narrow lanes leading down to the Bosphorus waterway late into the night, drawing more tear gas and water cannon spray.

Police also fired water cannon to disperse protesters in the centre of the capital, Ankara.

Gezi Park has been turned into a ramshackle settlement of tents by leftists, environmentalists, liberals, students and professionals who see the development plan as symptomatic of an overbearing government.

The authorities have said legitimate protesters in the park will be allowed to stay, for now, and they remained camped out.