Top officials at the Guantanamo Bay detention center on Tuesday defended a raid that resulted in a violent clash with detainees, saying the operation was critical and the handful of injuries on both sides were minor.

Soldiers with riot helmets and shields swept into recreation yards and met with resistance from several dozen prisoners, the leadership of the detention center said in interviews with journalists visiting the U.S. base in Cuba for the first time since Saturday's clash.

The confrontation ended within minutes, but not before two guards were struck in the head by prisoners and five prisoners were injured, including one hit by rubber pellets from what the military calls a "less-than-lethal" round fired from a modified shotgun.

"The appropriate amount of force was used for the situation," said Navy Rear Adm. John W. Smith, the commander of the detention center.

The guard force raided Camp 6 because the prisoners had for several weeks covered up 147 of the 160 security cameras, making it impossible to monitor them amid a weekslong hunger strike. Smith and members of his leadership team said they were concerned a prisoner might try to commit suicide. Officials said there were two attempted suicides since the protest began around Feb. 6.

To restore control, prison officials decided to move the prisoners in Camp 6 out of a communal area, where they were allowed to eat together and freely associate most of the day, into individual cells from which they are released for two hours a day for recreation.

The camp shown to journalists appeared to be well under the military's control. Prisoners could be seen pacing restlessly inside cells on closed-circuit TV monitors from the cameras, now uncovered, inside their cells. In a section of the prison that had been cleared, one prisoner had written in broken and misspelled English a message that appeared to read: "Stop torturing us. Stop desecrating our religion."

Troops trained for three weeks to carry out the raid and were "prepared for any level of potential resistance," said Army Col. John Bogdan, who is in charge of the guard force. What they encountered were prisoners with more than a dozen makeshift weapons, including broomsticks, homemade knives and long batons made of tightly coiled plastic and other materials.

Two guards were struck in the head during the confrontation but neither was seriously hurt and both have since returned to duty.

Five detainees were injured, including one who was hit by rubber pellets. Navy Capt. Richard Stoltz, who is in charge of the detainee hospital, said that "there was no significant blood loss" and the prisoner was treated at the scene.

The military said another prisoner cut his own head by banging it on a cell door. Stoltz said he was given about three stitches. Three others were scraped as guards secured the area and moved the men into the cells.

The communal areas of Camp 6 had once been held up as a model in Guantanamo.

Military officials had said prisoners had grown compliant as they were able to lessen their isolation, watch satellite TV and take classes. But prisoners in February started the hunger strike to protest their indefinite confinement and what they said were intrusive searches of their Qurans for contraband.

Smith said prisoners may later be allowed to return to the communal holding areas if they follow prison rules.

The hunger strike goes on, with 45 prisoners refusing meals and 13 being force fed, officials said.