Thousands of anti-government protesters have gathered in the Turkish cities of Ankara and Istanbul as the Prime Minister Tayyip Erdogan returns from a tour of North Africa.

The demonstrators are said to be calling for his resignation.

Earlier, Mr Erdogan told reporters in Tunisia that plans to redevelop a park in Istanbul would proceed, despite mass demonstrations.

He said violent groups were manipulating what had started as an environmental protest.

Four people, including a police officer, have died in the unrest.

Thousands of others have been injured and hundreds of people arrested.

Riot police fired tear gas at hundreds of demonstrators who threw stones at them and chanted anti-Erdogan slogans in the heart of the capital Ankara, witnesses said.

In the eastern province of Tunceli, several hundred protesters set up a street barricade and threw stones at police who responded by firing water cannon.

Police backed by armoured vehicles have fired tear gas and water cannon on stone-throwing protesters night after night, while thousands have massed peacefully in recent days on Taksim Square, where the demonstrations first began.

Mr Erdogan left on Monday in a defiant mood, dismissing the protesters as looters and vowing the unrest would be over in a matter of days, comments that his critics said further inflamed tensions.

AK Party Deputy Chairman Huseyin Celik called on party members not to go to the airport to greet Mr Erdogan on his return to avoid provoking trouble.

"Nobody should take it upon themselves to go and greet the prime minister in this situation. The prime minister does not need a show of strength," Mr Celik said in a television interview.

Deputy Prime Minister Bulent Arinc, formally in charge while Mr Erdogan is away, has struck a more conciliatory tone.

He apologised for the initial police crackdown on peaceful campaigners in Taksim's Gezi Park and met a delegation of protesters in his office in Ankara.

"The powers that be continue to counter with violence, pressure and prohibitionist policies ... demands which are being expressed in a peaceful and democratic manner," a spokesman for the delegation said after meeting Mr Arinc.

"We demand the removal from duty of those who gave the order to inflict force ... starting with the governors and police chiefs of Istanbul, Ankara and Hatay," he told reporters, referring to the areas worst affected by violence.

A second trade union federation representing hundreds of thousands of workers joined the protests yesterday, its members banging drums, trailing banners and chanting "Tayyip resign" as they marched on Taksim.

Around Ankara's Kugulu Park, a middle class area dotted with restaurants and bars, people chanted "dictator resign" and "everywhere is Taksim, everywhere is resistance" into the night.

Despite the protest, Mr Erdogan remains by far the country's most popular politician.

His AK Party has won an increasing share of the vote in three successive elections and holds around two thirds of the seats in parliament.

A man who rarely bows to any opposition, he has no intention of stepping down and no obvious rivals inside or outside his party.

But he, and those around him, face a challenge calming the protests without appearing to lose face.