Turkish police fired tear gas at protesters in Ankara on Sunday while thousands of people occupied Istanbul's main Taksim Square on the third day of mass demonstrations against Turkey's Islamist-rooted government.

Interior Minister Muammer Guler said more than 1,700 people had been arrested in the unrest that has spread to 67 cities nationwide, though most have since been released.

In Istanbul, a sea of protesters from across Turkey's political spectrum flooded Taksim a day after police pulled out of the area, waving flags and chanting "Government, Resign!" and "Istanbul is ours, Taksim is ours!".

From a nearby rooftop in Istanbul, a banner with the words: "Do not surrender" was unfurled.

Taksim has been at the heart of a wave of protests that have spread across the country in the biggest public outcry against Prime Minister Recep Tayyip Erdogan's government since it took power in 2002.

Rights groups have complained about what they said was a "disgraceful" heavy-handed response by police to the demonstrations while Turkey's Western allies appealed for restraint.

The unrest began as a local outcry against plans to redevelop Gezi Park near Taksim, but after a heavy-handed police response quickly snowballed into broader protests against what critics say is the government's increasingly conservative and authoritarian agenda.

After two days of violence, the situation appeared to have calmed in Istanbul Sunday after police pulled out of Taksim and officials adopted a more conciliatory tone.

But in Ankara police fired tear gas and used water cannon to disperse some 1,000 protesters who were attempting to march on the prime minister's high-security office, images that were shown live on the private NTV news network.

"The continuation of these protests... will bring no benefits but will harm the reputation of our country which is admired both in the region and the world," Foreign Minister Ahmet Davutoglu said on Twitter.

Guler said 58 civilians and 115 security officers had been injured in the three days of protests, although rights groups have put the number of injured in the hundreds.

Authorities say almost 100 police vehicles, 94 shops and dozens of cars have been damaged, with Guler estimating the cost at at more than 20 million liras (over eight million euros).

"They call me a dictator," Erdogan said in a speech on Sunday. "If they liken a humble servant to a dictator, then I am at a loss for words."

The prime minister had insisted on Saturday that his government would press ahead with the controversial redevelopment near Taksim although he said the project may not include a shopping mall, as feared by protesters.

He also admitted "some mistakes" in the police response.

Eylem Yildirim, a 36-year-old housewife and protester in Taksim, said she expected the crowds to die down after the weekend but said the people had made their point and the government knew they were "bitter and at the limits of their patience".

Mass circulation newspaper Milliyet plastered a picture of the packed square on its front page with the headline "Freedom Park".

- 'Disgraceful' police response -

Amnesty International said some protesters had been left blinded by the massive quantities of tear gas and pepper spray used by police.

Amnesty's Europe director John Dalhuisen said police excesses had become routine in Turkey "but the excessively heavy-handed response to the entirely peaceful protests in Taksim has been truly disgraceful."

Human Rights Watch said the number of injured was higher than official figures suggested and that one protester had lost an eye after police shot him with a plastic bullet.

Turkey's NATO allies Britain, France and the United States have all urged the Erdogan government to exercise restraint.

French Foreign Minister Laurent Fabius said Paris was calling for "a peaceful solution" but he rejected comparisons with the Arab Spring uprisings, saying: "We are dealing (in Turkey) with a government that was democratically elected."

The Turkey protests also come after a controversial new law introduced by Erdogan's ruling Justice and Development Party (AKP) that will restrict the sale and advertising of alcohol, a move that has sparked complaints that the government is trying to impose an Islamic agenda.

Erdogan's populist government is often accused of trying to make the predominantly Muslim but staunchly secular country more conservative and has also been criticised for its crackdown on opponents including Kurds, journalists and the military establishment.