Prisoners attacked guards with fan blades and other improvised weapons prompting guards to fire rubber bullets, said Rear Admiral Harry Harris, commander of Joint Task Force Guantanamo.
Six prisoners suffered minor injuries in what he called "the most violent outbreak" at the prison since it was opened in January 2002.
The ambush was reported on the day a UN panel called on the United States to close the camp that has held around 500 suspected Al-Qaeda and Taliban "enemy combatants" in Cuba for over four years.
Military guards were lured into a dorm room in the minimum-security wing of the detention centre by a detainee pretending to be preparing to hang himself, said Harris.
The guards entered to try to save his life when they were pounced upon by other detainees wielding makeshift weapons.
The floor had been smothered with faeces and soapy water to make it slippery, he said, speaking at a press conference at Guantanamo Bay that was carried by conference call to reporters elsewhere.
A five-minute fight ensued with 10 detainees battling 10 guards before they were eventually subdued.
No guards were seriously injured, however some reportedly suffered scrapes and bruises.
The attack followed two real suicide bids, where two inmates overdosed on prescription drugs, said Harris, adding that they were unconscious but in a stable condition in the main hospital at the US Navy base.
There have now been 41 suicide attempts by 25 different prisoners at Guantanamo since it opened, Harris said. One inmate has tried to kill himself 12 times.
Earlier a camp spokesman had reported another suicide bid, but Harris said this was a detainee who had complained of dizziness after taking five pills and this was not considered a serious attempt to take his own life.
However an emergency alert sparked by the alerts led to the ambush, which was staged in Camp Four, a compound where security is most relaxed and inmates live in communal conditions.
Another camp officer, Colonel Mike Bumgarner, told the press conference how guards opened fire believing they were losing control.
"Detainees were jumping out of the beds on top of the guards" and some had been knocked to the floor, Bumgardner said.
"Frankly we were losing the fight at that point," he said, so five rounds of rubber-cased shotgun pellets were fired.
Harris insisted however that "minimum force was used to quell the disturbance."
Calls to close camp
News of the suicide ruse emerged at the United Nations Committee Against Torture issued a report on Friday calling for the prison to be closed and inmates either tried or freed.
While the committee acknowledged terrorism is a "terrible threat" and the US faces "a complex legal and political context", it said international rules against torture and other mistreatment apply "at all times".
In response White House spokesman Tony Snow said President George W Bush has already declared that he wanted to close Guantanamo, and insisted that all Guantanamo prisoners are treated humanely.
The US military said 23 detainees conducted a coordinated attempt to hang or strangle themselves during a week-long protest in 2003, something that was only disclosed last year.
The military said the actions were "self-injurious behaviour" aimed at attracting attention rather than real suicide attempts.
Civilian lawyers who have visited the camp say there is widespread depression among inmates.
Harris said about 18 percent of the inmates have "some form of mental issue" and between eight and 10 percent have "serious mental issues".
