US Defence Secretary Leon Panetta confirmed this week that capital punishment was on the table under the US military code for the rogue sniper who last week killed 16 Afghanis.

He also confirmed that the soldier, who had suffered a serious head injury in a vehicle roll-over during a tour of duty in Iraq, had confessed to his crime.

“My understanding is the (death penalty) could be considered,” Mr Panetta said.

The public backlash in Afghanistan started on Tuesday with protesters in the eastern city of Jalalabad demanding the soldier be tried publicly, as they burnt an effigy of US President Barack Obama.

Last Sunday, the staff sergeant, a trained sniper working with special forces security advisers, broke into several houses in western Kandahar Province and massacred 16 people with single shots to the head before setting fire to their bodies.

Mr Obama warned this week against using the incident as an excuse to “rush to the exits” from Afghanistan.