The Turkish government said on Monday it may send the army on to the streets to end the unrest that has gripped the country for almost three weeks. The warning came after another night of violent clashes between police and protesters calling for the resignation of Prime Minister Recep Tayyip Erdogan.

Deputy Prime Minister Bulent Arinc told Turkish state-run television that the government would use “all its powers” to end the unrest. “There is the police, If that’s not enough there’s the gendarmerie [a paramilitary force]. If that’s not enough there are the armed forces,” he added.

The deployment of the military would represent yet another escalation of a crisis that looked to be heading for a peaceful resolution as recently as Saturday, before Mr Erdogan ordered police in to clear protesters from Gezi Park with tear gas and rubber bullets.

Download the new Independent Premium app Sharing the full story, not just the headlines

It’s not clear how far the army would be prepared to intervene if Mr Erdogan ordered it to. He has spent the past decade in power stripping the military of influence in politics, and in recent years he has purged senior generals. The army traditionally views itself as the guardian of the secular values many protesters accuse the Islamist Mr Erdogan of undermining.

The threat follows weeks of often brutal tactics by police that have failed to quell the demonstrations. Protesters have been tear-gassed, beaten and sprayed with water cannon, but they still keep coming onto the streets.

In a disturbing development, supporters of Mr Erdogan were filmed on Sunday night moving through the streets armed with clubs. Witnesses claimed the vigilantes attacked protesters with knives, and that police did nothing to stop them.

Some 5,000 people have been injured since the unrest began, according to Turkish medical officials, and at least four have died. A 16-year-old boy was in a coma yesterday after being hit in the head by a tear gas canister fired at close quarters by police.

Almost 350 people have been arrested in the last two days alone, according to the Istanbul Bar Association, and many have been denied access to laywers. Those arrested reportedly include a British citizen.

Police have repeatedly targeted medics treating the wounded. One doctor and three nurses are being held, according to the Turkish Doctors’ Union, and staff at the German Hospital said police had attacked the emergency department.

Police have also removed the piano of a German musician who played for protesters. Officers were photographed taking the instrument away after its owner fled the tear-gas assault.

Video: Protest in Taksim Square