Tens of thousands of people have taken to the streets in Turkey's four biggest cities and clashed with riot police firing tear gas for a third day in the fiercest anti-government demonstrations in years.

For much of Sunday, the atmosphere in Istanbul's Taksim Square was festive, with some people chanting for Recep Tayyip Erdogan, the prime minister, to resign and others dancing. There was little obvious police presence.

But in the nearby Besiktas neighbourhood, riot police fired tear gas and water cannons to keep crowds away from Erdogan's office in Dolmabahce Palace, a former Ottoman residence on the shores of the Bosphorus.

There were similar scenes in Ankara's main Kizilar Square, with police raiding a shopping complex in the city's centre and detaining several hundred.

Al Jazeera's Anita McNaught, reporting from near Erdogan's office in Istanbul late on Sunday night, said the demonstrators used a mechanical digger and trucks to break through police lines, right up to a government building.

"But police redoubled their efforts, pushing the protesters back. I have not seen any evidence of live fire, but some have [protesters] been seriously injured by gas canisters fired at them."

Nationwide protests

Muammer Guler, the interior minister, told the Hurriyet newspaper that there had been more than 200 demonstrations in 67 cities.

Hundreds of injuries have been reported.

Erdogan on Sunday renewed his calls for an end to the disturbances, saying: "If you love this country, if you love Istanbul, do not fall for these games."

He blamed the main secular opposition party of inciting the crowds, whom he called "a few looters", and said the redevelopment would go ahead.

Turkey is due to hold local and presidential elections next year in which Erdogan is expected to stand, followed by parliamentary polls in 2015.

Erdogan's policies blamed

The main opposition Republican People's Party (CHP) denied orchestrating the unrest, blaming Erdogan's policies.

"Today the people on the street across Turkey are not exclusively from the CHP, but from all ideologies and from all parties," Mehmet Akif Hamzacebi, a senior party member, said.

The unrest erupted on Friday when trees were torn down at a park in Istanbul's main Taksim Square under government plans to redevelop the area, but widened into a broad show of defiance against the governing, Islamist-rooted AK Party.

The ferocity of the police response in Istanbul shocked Turks, as well as tourists caught up in the unrest in one of the world's most visited destinations.

Footage on YouTube showed one protester being hit by an armoured police lorry as it charged a barricade.

Conservative meddling

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 Turkey'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.

Tighter restrictions on alcohol sales and warnings against public displays of affection in recent weeks have also provoked protests.

Erdogan, appearing on Sunday on television for the fourth time in less than 36 hours, justified the restrictions on alcohol as for the good of people's health.

"I want them to know that I want these [restrictions] for the sake of their health ... Whoever drinks alcohol is an alcoholic," he said.