Turkey has said it may bring in the army to help end nearly three weeks of nationwide anti-government protests.

The warning came as two major union federations went on strike on Monday over police violence against demonstrators.

The government raised the threat of putting soldiers on the streets after a weekend of violent clashes prompted by the eviction of campers occupying Istanbul's Gezi Park, the epicentre of the protest movement.

Police "will use all their powers" to end the unrest, Bulent Arinc, deputy prime minister, said in a televised interview.

"If this is not enough, we can even utilise the Turkish armed forces in cities."

The deployment of the military, the self-described guardian of the secular state, would mark an escalation of a crisis posing the biggest challenge yet to Recep Tayyip Erdogan's Islamic-rooted government.

But after losing their focal protest site, with Gezi Park and the adjoining Taksim Square still guarded by police on Monday, the demonstrations appeared to lose some of their intensity.

The more subdued mood was in stark contrast to the weekend, when riot police fired volleys of tear gas and jets of water in hours-long running battles with thousands of protesters.

Groups of hundreds of striking workers from the KESK and DISK union federations took to the streets in Istanbul, Ankara and the western city of Izmir calling for the police violence against protesters to end immediately and chanting "Erdogan, resign!".

Their progress was at times blocked by officers backed by water-cannon vehicles but there were no reports of fresh clashes.

Smaller turnout

The unions' turnout was smaller than when they marched in support of the demonstrators on June 5.

The labour rallies had a more structured feel than the counterculture-style sit-in at Gezi Park's tent city, and the work stoppage involved many professionals who make up a liberal, urban class that mostly backs the anti-Erdogan protesters.

But labour strikes often have little visible impact on daily life in Turkey and Monday's rallies were no different.

TV images showed crowds of government supporters in Istanbul facing down some protesters and chanting "the hands targeting the police should be broken".

On Twitter, a trending topic urged protesters to stay home - some expressing concern that pro-government mobs might attack them.

But overnight, for hours, a lone man stood silently on Taksim Square, eventually joined by about 20 other people who did likewise before police escorted them away.

The group put up no resistance. Pockets of unrest erupted elsewhere in Istanbul, with police resorting to water cannon and tear gas at times.

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, escalating into countrywide demonstrations against Erdogan, seen as increasingly authoritarian.

So far four people have been killed and nearly 7,500 people injured, according to the Turkish Medical Association (TBB).

At a rally of more than 100,000 supporters of his ruling Justice and Development Party (AKP) on Sunday, Erdogan defended his response to the demonstrations, saying it was his "duty as prime minister" to order police to storm Gezi Park after protesters defied his warnings to clear out.

He also threatened to go after those who had offered assistance to the protesters, alluding to the luxury hotels who opened their doors to people fleeing the clouds of tear gas and jets of water during the park's evacuation on Saturday.

"We know the ones who sheltered in their hotels those who cooperated with terror. They will be held accountable," Erdogan said.

Opponents accuse him of forcing Islamic conservative reforms on the mainly Muslim but staunchly secular nation of 76 million, and of pushing big urban development projects at the expense of local residents.

But Erdogan, 59, has been in power since 2002 and remains popular. His AKP has won three elections in a row, taking nearly half the vote in 2011 after presiding over strong economic growth.

A survey by Metropoll, published in the Zaman daily, found that the AKP would still come first if elections were held now, with 35.3 percent of the vote.

International criticism

The US and other Western allies have widely criticised Erdogan's handling of the crisis, undermining Turkey's image as a model of Islamic democracy.

Some Turkish leaders, including Erdogan, have suggested that outside forces are behind the demonstrations in a bid to destabilise the country.

The US on Monday denied any role in the recent unrest.

"We absolutely reject the accusations that US groups or individuals are responsible for or have elevated, or escalated, I should actually say, the protests in Turkey," Jen Psaki, the State Department spokeswoman, said.

German Chancellor Angela Merkel, for her part, urged Turkey to respect democratic freedoms and said the police response to the protesters "was much too harsh".

"I am in any case shocked," she told RTL television on Monday.