A US soldier who allegedly shot dead 16 civilians in Afghanistan is being held in a US military jail in Kansas as his name and new details about the veteran's past emerged.

The soldier, identified yesterday as US Army Staff Sergeant Robert Bales, had served three combat tours in Iraq, and was on his first deployment to Afghanistan.

Reports said Sgt Bales, 38, was the suspected gunman and a US official speaking on condition of anonymity told AFP news agency they were "correct".

Sgt Bales allegedly left his base in the southern province of Kandahar before sunrise last Sunday, entered an Afghan village and opened fire, killing men, women and children.

The incident has sent US-Afghan relations into the deepest crisis since the 2001 US-led invasion.

The US military has not officially released the soldier's name, or charged him with a crime yet.

Sgt Bales was brought to the prison at Fort Leavenworth, Kansas, on a flight from Kuwait late yesterday, army officials said.

Several websites containing pictures and stories about Sgt Bales, including a 2009 Department of Defence page, were taken down by the time his identity was revealed, but some versions of the websites could still be accessed.

According to a cached online article, dated February 2009, from the official US army homepage, Sgt Bales participated in one of the bloodiest clashes of the Iraq war.

In January 2007, he took part in a battle against a Shia group in southern Iraq known as the Soldiers of Heaven.

In the 15-hour engagement, according to the US army article, 250 fighters were killed, all enemy, and Sgt Bales said he was proud his unit "discriminated between the bad guys and the noncombatants and then afterward we ended up helping the people that three or four hours before were trying to kill us".

He added: "I think that's the real difference between being an American as opposed to being a bad guy, someone who puts his family in harm's way like that."

Outraged locals wanted Sgt Bales to stand trial in Afghanistan, but the US military quickly flew him out of the country.

Sgt Bales' lawyer said that his client had been angry about a serious injury that a comrade sustained the day before the massacre, but held no animosity toward Muslims.

Sgt Bales, the father of young children, was also upset because after his extensive Iraq duty he did not believe he would be deployed to Afghanistan, according to US news reports.