Soldiers move into the Soldier Readiness Centre on Fort Hood. Photo / AP

Soldiers move into the Soldier Readiness Centre on Fort Hood. Photo / AP

NEW YORK - Accustomed to terrible human loss overseas, the United States Army was last night struggling to come to terms with a savage outbreak of violence at home after an officer opened fire on the sprawling Fort Hood military base in Texas, which is at the tip of the spear of regular US troop deployments to Iraq and Afghanistan.

After hours of confusion when the entire complex - the largest such base in the world - located between Waco and Austin, was on a security lockdown, a military spokesman confirmed the rampage had ended with the deaths of 12 people.

A 13th died late last night.

Thirty people were injured, and most were rushed to hospitals across Texas.

The shock that rippled across the country was hardly relieved after the shooter was identified as a trusted officer with medical duties.

Officials said Major Nadal Malik Hasan, a doctor and psychiatrist, was shot and wounded by military police at the scene but not before he had extinguished a dozen lives.

Military sources added that two other soldiers were apprehended, though by last night one had been released. There was no information on what role the second person may have had in the killings.

Hasan opened fire, they said, with two handguns. There was no reason he should have been bearing arms as a doctor.

Hasan, said to be 39 years old, allegedly opened fire about 1.30pm inside a personnel processing building.

It is a building soldiers routinely pass through while getting ready to deploy.

However, at least one of the victims was identified as a civilian.

A motive for the shooting was hard to pin down last night.

However, there were reports that Hasan, who was trained in psychiatry and medicine in Bethesda, Maryland, was preparing for deployment to Iraq and was not happy to be going there.

He had previously worked at the Walter Reed veterans' hospital outside Washington.

There have been six incidents on the ground in Iraq since the start of the conflict when US troops have been felled by one of their own with the loss of 14 lives.

Last May, a soldier opened fire on fellow soldiers in a medical facility at Camp Liberty outside Baghdad, killing five.