In his first apparent concession since the deadly unrest began nearly two weeks ago, Turkey's prime minister has agreed to meet protest leaders whose mass anti-government demonstrations have rocked the country.

Recep Tayyip Erdogan's overture was announced on Monday even as thousands again took to the streets of Istanbul, Turkey's biggest city, and the capital Ankara, defying his threat that they would "pay a price" for the ongoing unrest - the biggest challenge yet to his Islamic-rooted government's decade-long rule.

"Our prime minister has given an appointment to some of the groups leading these protests," Bulent Arinc, Turkey's deputy prime minister, said, adding that the talks would take place on Wednesday.

"They will be briefed on the facts and our prime minister will listen to their thoughts."

Arinc made the statement in Ankara after a six-hour cabinet meeting on the crisis.

Despite the conciliatory gesture, he said: "Illegal demonstrations will not be allowed anymore in Turkey."

However, as night fell riot police were firing tear gas in the affluent Tunali Hilmi street of Ankara to disperse hundreds of protesters, according to AFP news agency.

Restaurant owners were forced to shut themselves in with their clients to escape the gas, on the third consecutive night of clashes between protesters and police in the city.

Most of the demonstrators fled after being charged by the police.

After a weekend of record crowds of tens of thousands in Istanbul's Taksim Square, the epicentre of the unrest, protesters packed the music-filled, flag-festooned area and nearby Gezi Park for an 11th night on Monday.

Defiant response

Erdogan, 59, has so far responded with defiance, inflaming tensions further on Sunday by staging his own rallies, firing up AK Party supporter with combative rhetoric.

"Those who do not respect this nation's party in power will pay a price," he told thousands of cheering party faithful in Ankara, as just a few miles away riot police doused thousands with tear gas and water.

The unrest first erupted after police cracked down heavily on a campaign to save Istanbul's Gezi Park from demolition on May 31.

The trouble escalated into nationwide displays of anger against Erdogan and his ruling Justice and Development Party, or AKP, seen by their opponents as increasingly authoritarian.

Nearly 5,000 demonstrators, scores of whom are young and middle-class, have been injured and three people have died.

The national doctors' union says the dead include two protesters and a policeman, while almost 4,800 people have been injured.

Erdogan said on Sunday that over 600 police officers had been hurt.

Opponents accuse Erdogan of repressing critics - including journalists, minority Kurds and the military - and of pushing conservative Islamic values on the mainly Muslim but staunchly secular nation.

But Erdogan is also considered the most influential leader since Mustafa Kemal Ataturk, the father of modern Turkey, and remains the country's favourite politician.

His AKP has won three elections in a row and took nearly half the vote in the 2011 elections, having presided over strong economic growth.

Secure in his popularity, he urged loyalists on Sunday to respond to the demonstrators by voting for the AKP in local polls next year.

"I want you to teach them a first lesson through democratic means at the ballot box," he said.

Turkey will see both local and presidential elections in 2014. The AKP plans to launch its first campaign rallies in Ankara and Istanbul next weekend, expected to bring tens of thousands into the streets.

A general election is scheduled for 2015, and officials have ruled out any suggestion of calling early polls in view of the crisis.