Protesters lit fires and scuffled with police in parts of Istanbul and Ankara early on Sunday, but the streets were generally quieter after two days of Turkey's fiercest anti-government demonstrations in years.

Hundreds of protesters set fires in the Tunali district of the capital Ankara, while riot police fired tear gas and pepper spray to hold back groups of stone-throwing youths near Prime Minister Tayyip Erdogan's office in Istanbul.

Istanbul's central Taksim Square, where the protests have been focused, was quieter after riot police pulled back their armored trucks late on Saturday.

Demonstrators lit bonfires among overturned vehicles, broken glass and rocks and played cat-and-mouse on side streets with riot police, who fired occasional volleys of tear gas.

The unrest was triggered by protests against government plans to build a replica Ottoman-era barracks to house shops or apartments in Taksim, long a venue for political protest. But it has widened into a broader show of defiance against Erdogan and his Islamist-rooted Justice and Development Party (AKP).

Interior Minister Muammer Guler said on Saturday that 939 people had been arrested in more than 90 separate demonstrations around the country. More than 1,000 people have been injured in Istanbul and several hundred more in Ankara, according to medics. Amnesty International also referred to reports of two deaths in the protest, but that information could not be confirmed.

The ferocity of the police response has shocked Turks, as well as tourists caught up in the unrest in one of the world's most visited destinations. It has drawn rebukes from the United States, European Union and international rights groups.

Helicopters have fired tear gas canisters into residential neighborhoods and police have used tear gas to try to smoke people out of buildings. Footage on YouTube showed one protester being hit by an armored police truck as it charged a barricade.

"All dictators use the same methods, oppressing their people," said Mehmet Haspinar, a 60-year-old retired government employee sheltering in a building entrance way as riot police fired pepper spray in an Ankara back street.

Europe's fastest growing economy

Erdogan has overseen a transformation in Turkey during his decade in power, turning its once crisis-prone economy into the fastest-growing in Europe.

He remains by far the country's most popular politician, but critics point to what they see as his authoritarianism and religiously conservative meddling in private lives in the secular republic. Some accuse him of behaving like a modern-day sultan.

Tighter restrictions on alcohol sales and warnings against public displays of affection in recent weeks have provoked protests. Concern that government policy is allowing Turkey to be dragged into the conflict in neighboring Syria by the West has also led to peaceful demonstrations.

"It's about democracy, and it's going to get bigger," said one demonstrator in a side street off Taksim Square, trying to rinse tear gas from his eyes.

Erdogan has called for an immediate end to the protests and has said his government will investigate claims that the police have used excessive force. But he remained defiant.

"If this is about holding meetings, if this is a social movement, where they gather 20, I will get up and gather 200,000 people. Where they gather 100,000, I will bring together one million from my party," he said in a televised speech.

He said the redevelopment of a park in Taksim was being used as an excuse for the unrest and warned the main opposition Republican People's Party (CHP) against stoking tensions.

In spite of Erdogan's focus on the CHP, the protests have involved a broad spectrum of people opposed to the prime minister and do not appear to have been organised by a single political party.

After the police withdrew from Taksim Square, supporters of Turkey's pro-Kurdish BDP party danced a Kurdish dance in celebration just yards from nationalists waving Turkish flags. They jointly chanted "shoulder to shoulder against fascism."

A group of soccer fans from fierce rival Istanbul clubs Fenerbache, Besiktas and Galatasaray joined the chant.

Protesters voiced anger at the limited coverage of the demonstrations by Turkish television stations, with many seeing government intimidation as to blame. Scores of journalists have been imprisoned during Erdogan's decade in power.

"Government crony media for sale" was written in graffiti over one television broadcast van abandoned in Taksim Square.

Open gallery view Turkish protesters clash with riot police near the former Ottoman palace, Dolmabahce, where Turkey's Prime Minister Recep Tayyip Erdogan maintains an office in Istanbul, Turkey, late Saturday, June 1 Credit: AP