At least nine people have been killed during an apparent attempt to break out of an Iraqi jail located at a military base in Baghdad, officials say.
Bodies were taken to a nearby hospital after the shooting
The US military said four wardens, four prisoners and an interpreter died at the Adala base in Kadhimiya, but there are reports of up to 20 deaths.
The inmates - described as suspected insurgents - were being transferred within the base when shooting began.
All prisoners have now been accounted for, officials said.
Adala base is a joint Iraqi police and army compound next to the River Tigris. After the war it was used by the US military and called Camp Justice
The facility is said to hold between 90 and 200 inmates.
"Sixteen prisoners attempted to escape the facility after first storming the armoury," a US military statement said.
"A fire fight ensued leaving four Iraqi prison guards, one interpreter and four prisoners dead. In addition, one US soldier and five prisoners were injured during the attempted escape," it added.
Brig-Gen Jalil Khalaf, the commander of the Adala base, said that the incident had not been an uprising, but an unsuccessful escape attempt.
"The prison now is calm, and the investigation is ongoing," he told Reuters.
The shootings come only days after the US said it would not hand over detainees to the Iraqi authorities until they raised levels of care in prison facilities.
On Sunday, an official said Iraq had to meet US standards after the discovery of 170 detainees at an interior ministry centre, some allegedly suffering from abuse and starvation.
The alleged abuse discovered by US and Iraqi troops included electric shocks and the removal of finger nails.
Prison conditions in Iraq became a matter of controversy in the first months after the 2003 invasion that overthrew Saddam Hussein, beginning with abuse scandals involving US military guards.
Sunni Arabs say the latest alleged abuse was perpetrated by Shia sectarian militias who they say had been given control of interior ministry prisoners.