An American soldier in Baghdad was in custody last night after opening fire inside the confines of a counselling clinic, killing five other US soldiers.
The shocking attack made yesterday one of the deadliest days for the US military in Iraq in more than a year.
"Such a tragic loss of life at the hands of our own force is a cause for great concern," said the US Defence Secretary, Robert Gates.
The counselling clinic is inside the boundaries of Camp Liberty, a sprawling US military base outside Baghdad, on the edge of the city's international airport. President Barack Obama made a surprise visit to the camp last month.
It appeared that the assailant was a soldier seeking assistance at the clinic, also known as a stress centre, possibly to deal with emotional issues arising from his service in Iraq.
"The shooter is a US soldier and he is in custody," said Marine Corps Lieutenant Tom Garnett, a US military spokesman in Baghdad.
There was no word on a possible motive for the attack or whether the victims were other soldiers visiting the clinic or clinic employees.
"Our hearts go out to the families and friends of all service members involved in this terrible tragedy," said Colonel John Robinson, the US spokesman in Iraq.
The death toll equalled that of a bombing near a police headquarters in the northern city of Mosul on 10 April, which was the deadliest attack on US soldiers in the country in more than 12 months.
But there was the additional shock that yesterday the lives were lost to a weapon wielded by one of their own.
Attacks on officers and sergeants, sometimes called "fragging", were a fairly common phenomenon for the US military during the Vietnam War, but have been seen far less often in the conflicts in Iraq and Afghanistan.
Officials said the shooting in the clinic took place about 2pm local time.
As well as those who were killed, three other military personnel were wounded. The shooting is likely to lead to a review of security at the clinics where soldiers can check in with their weapons.
The attack at Camp Liberty recalled the killing of two officers by a US soldier at a military camp in Kuwait just before the US invasion of Iraq in 2003. Hasan Akbar, an army sergeant, was convicted of murdering the officers and sentenced to death.
The most recent case of a US soldier turning his gun on his comrades took place last September in another camp south of Baghdad.
Sgt Joseph Bozicevich was charged with killing two of his superiors. At the time, he reportedly said he had been berated by them and he could not take it any longer.