Turkish riot police have used tear gas and water cannon during clashes with thousands of protesters in Istanbul, as more people joined the second day of the fiercest anti-government demonstrations for years.

Turkish Prime Minister Recep Tayyip Erdogan on Saturday called for an immediate end to the protests, that were triggered by government redevelopment plans of a park in Istanbul's Taksim Square.

The protests have since widened into a broader show of defiance against Erdogan and his government and spread to Ankara and other cities.

Interior Minister Muammer Guler said 79 people have been injured in the unrest and hundreds detained.

"There have been 939 detentions in various cities. Some of them have already been released," Guler told reporters in comments broadcast by Turkish state television.

Mevlut Cavusoglu, the vice president of foreign affairs, told Al Jazeera that protests turned violent with demonstrators attacking police cars and destroying property.

But he did admit that police officers used "excessive force" against demonstrators and said it would be investigated.

"It is true police used excessive force and this is not acceptable. We can not accept this because we have been trying to democratise this country," he said.

Police left Taksim Square on Saturday afternoon, taking away barricades and allowing in tens of thousands of protesters to gather.

Earlier, police fired tear gas and water cannon down a major shopping street as crowds chanting "unite against fascism" and "government resign" marched towards Taksim, where hundreds were injured in clashes on Friday.

A police helicopter buzzed overhead as groups of mostly young men and women, bandanas or surgical masks tied around their mouths, used Facebook and Twitter on mobile phones to try to organise and regroup in side streets.

Hundreds of people were chasing police vehicles as they were trying to leave the area.

Growing momentum

Al Jazeera's Rawya Rageh, reporting from Taksim Square, said there was growing momentum against Erdogan.

"What protesters are telling us here is that they are angry about what they are describing as the stubborn reaction of the prime minister and the heavy-handed tactics of his police force.

"The protesters have been directing their anger both at the PM and also at the media. They say the media has sold out and is not covering these events."

One of the protesters told Al Jazeera: "It started with us defending the last bit of green space we have left. We have been gassed, we have been clubbed, and we have been hospitalised."

Ibrahin Kalin, chief adviser to the prime minister, told Al Jazeera that police had fired tear gas in response to a group of protesters attacking police as they were leaving Taksim Square.

After police left the area, a celebratory mood spread in the square, with people waving flags, and cheering and clapping at anti-government speeches. Many drank beer in protest of newly enacted alcohol curbs, singing "cheers Tayyip!"

Elsewhere in Istanbul, protesters made their way towards the prime minister's office in Besiktas.

Al Jazeera's Gokhan Yivciger reported that they hijacked a truck from the municipality which they used as a barricade against the police, who were using tear gas to keep protesters at a distance.

Ankara clashes

Stone-throwing protesters also clashed with police firing tear gas in the Kizilay district of central Ankara. Riot police with electric shock batons chased demonstrators into side streets and shops.

The police’s record on abusive policing has been surpassed as they use tear gas and water cannon fire against peaceful demonstrators. Emma Sinclair-Webb , senior Turkey researcher at Human Rights Watch

Al Jazeera's Gonca Senay said the situation calmed down on Saturday evening.

"The police are still firing tear gas, but not as frequently as before," she said.

"Protesters in Ankara were angry at the government and how police behaved in Istanbul."

Rights groups spoke out against the police's allegedly excessive use of force.

"The police’s record on abusive policing has been surpassed as they use tear gas and water cannon fire against peaceful demonstrators,” said Emma Sinclair-Webb of Human Rights Watch.

"The government’s failure to respect the right to protest and to speak out is fuelling discontent among people in Turkey."

Amnesty International said it kept its office, close to Taksim, open as a "safe haven for protesters escaping police violence throughout the night".

The group said 20 doctors were in the office, treating injured protesters.

Protests also broke out in the coastal city of Izmir late on Friday.

The demonstration at Taksim's Gezi Park started late on Monday after trees were torn up to make way for redevelopment including building a shopping mall and the reconstruction of a former Ottoman army barracks.

Erdogan vowed to push ahead with the plans and said the issue was being used as an excuse to stoke tensions.

"Every four years we hold elections and this nation makes its choice," he said in a speech broadcast on television.

"Those who have a problem with government's policies can express their opinions within the framework of law and democracy ... I am asking the protesters to immediately end these actions," he said.

The opposition accused him of behaving like a dictator.

"Tens of thousands are saying no, they are opposing the dictator ... The fact that you are the ruling party doesn't mean you can do whatever you want," said Kemal Kilicdaroglu, leader of the main opposition Republican People's Party (CHP), which was allowed to hold a public demonstration in Taksim on Saturday.