Turkish Prime Minister Recep Tayyip Erdogan on Tuesday claimed victory over anti-government protesters after a heavy crackdown, as police raided homes and arrested dozens of demonstrators in a bid to stamp out nearly three weeks of unrest.

After a weekend of clashes sparked by the eviction of protesters from Istanbul's Gezi Park, the focal point of the protests, demonstrators have struggled to regroup and police have since fought only sporadic battles with smaller groups of demonstrators across the country.

Overnight, riot police in the capital Ankara briefly fired tear gas and water cannon at protesters who hurled back stones and hid behind makeshift barricades, but there were no other reports of confrontations.

In Istanbul, dozens of demonstrators switched to silent protests, standing still in quiet defiance in the main Taksim Square located next to Gezi Park.

As the protests appeared to lose their intensity, Erdogan said he had overcome the crisis, seen as the biggest challenge yet to his Islamic-rooted government's decade-long rule.

"Our democracy has been tested again and came out victoriously," the premier told members of his ruling Justice and Development party (AKP) to roaring applause.

"The people and the AKP government have foiled the plot... hatched by traitors and their foreign accomplices."

Confident he has weathered the storm, he warned against any resurgence of the protests.

"From now on, there will be no question of showing any tolerance to people or organisations who engage in violent acts."

Erdogan has been widely criticised for his handling of the turmoil, with the United States and other Western allies strongly condemning the use of excessive police force against protesters.

But the premier said the police had "successfully passed the test of democracy" with their response to the unrest and vowed to increase their powers.

His comments came as police carried out raids at homes across the country, detaining over 100 demonstrators.

In Istanbul, officers arrested around 90 members of the Socialist Party of the Oppressed (ESP), a small leftist group that has been active in the demos, the Istanbul bar association said.

Local media said 30 people were also arrested in Ankara and another 13 in the northwestern city of Eskisehir.

Interior Minister Muammer Guler spoke of 62 arrests in Istanbul and 23 in Ankara, and said they were linked to an ongoing anti-terrorist probe into the Marxist-Leninist Communist Party (MLKP) "which also took part in the Gezi Park protests".

More than 500 demonstrators had already been arrested on Sunday in clashes that raged after the Gezi Park eviction, the Istanbul and Ankara bar associations said.

Meanwhile, Hurriyet Daily News reported that the justice ministry was working on legislation to regulate social media, heavily used by demonstrators to organise the protests.

Erdogan lashed out at Twitter at the start of the unrest, branding it a "troublemaker" and accusing the online messaging service of spreading "lies".

Turkey's crisis began when a sit-in to save Gezi's 600 trees from being razed in a redevelopment project prompted a brutal police response on May 31.

The violence snowballed into countrywide demonstrations against what demonstrators say are Erdogan's increasingly authoritarian and conservative Islamic policies.

Gezi Park became the epicentre of the protests, with thousands occupying the patch of green in a carnival-like atmosphere.

After defying Erdogan's repeated warning to clear out, he ordered police to storm the site on Saturday, sending campers scrambling to flee salvos of tear gas and jets of water and sparking hours-long running battles with police.

Gezi Park has been sealed off since and guarded by police, who have also banned demonstrators from massing on the adjoining Taksim Square.

To get around the ban, a single man appeared on the square overnight, standing quietly still for more than five hours in a "standing man" protest that quickly went viral under the hashtag "#duranadam" (standing man).

The choreographer, Erdem Gunduz, attracted several copycats before they were all dispersed by police. Around 10 demonstrators were detained.

On Tuesday, dozens of mostly young demonstrators held their own silent vigil in the square, standing still in the afternoon sun not saying a word, as police looked on without intervening.