WASHINGTON (CN) – Keeping a lid on videos that show Guantanamo Bay guards force-feeding detainees during a hunger strike, the D.C. Circuit ruled Friday that the United States has national security on its side.

Jihad Diyab introduced the force-feeding videos under seal while challenging his long detention at the military detention center.

A citizen of Syria who the U.S. government suspected of forging documents for al-Qaida, Diyab was among the many detainees at Guantanamo held for years without charge or trial. He spent 14 years in custody before Guantanamo’s parole board approved him for transfer to Uruguay, but the secrecy of the force-feeding videos inspired demands by 16 news organizations.

Though a federal judge had sided with the media, the D.C. Circuit reversed Friday. The ruling from the three-judge panel is mostly unanimous, but each judge expounded on the decision in a separate opinion.

U.S. Circuit Judge Raymond Randolph penned the lead opinion, which credits the government’s point that the videos could prepare current and future captives of the U.S. government to oppose techniques used by guards to keep control in their facilities.

“When detainees resist what are already hazardous procedures for the guards, this could further endanger government personnel at Guantanamo,” says. “Guards have been kicked, grabbed, punched, knocked down, bitten and sprayed with bodily fluids. The government’s interest in ensuring safe and secure military operations clearly overcomes any qualified First Amendment right of access.”

Identified in the case by Jihad Dhiab, a variant spelling, Diyab was one of the inmates at Guantanamo Bay who refused to eat for months at a time to protest the conditions at the prison. As many as 200 prisoners joined the strike, causing guards to force the prisoners from their cells and feed them against their will, typically through a tube inserted through their noses.

The government marked the videos of the force-feeding as “secret,” and Randolph notes that the news organizations have never challenged this designation. In Randolph added that habeas corpus cases do not come with the broad expectation of public access that accompanies criminal cases.

“More significant is that from the beginning of the republic to the present day, there is no tradition of publicizing secret national security information involved in civil cases, or for that matter, in criminal cases,” Randolph wrote. “The tradition is exactly the opposite.”

Shelby Sullivan-Bennis, an attorney with the international human rights group Reprieve, said in a statement she was “shocked” by Friday’s reversal.

“The government so feared the shame that would come from the release of these videos, they limited even people with all the proper security clearances who represented other detainees from seeing them,” Sullivan-Bennis said in the statement. “These are people who would be unable to describe the videos in any detail to the world. As one of the three defense counsel who has ever been allowed to view the video tapes, I can say that I am not remotely surprised that the government wants to hide their circus of horrors from the public’s scrutiny.”