A guard opens the gate at the entrance to Camp VI, a prison used to house detainees at the U.S. Naval Base at Guantanamo Bay, Cuba, March 5, 2013. REUTERS/Bob Strong/File Photo

By Andrew Chung

(Reuters) - A U.S. appeals court on Friday blocked the release of classified videos of a former Guantanamo Bay prisoner being force-fed while on a hunger strike, in a ruling that underscored the power of the presidency in national security matters.

A three-judge panel of the U.S. Court of Appeals for the District of Columbia Circuit in Washington unanimously overturned a lower court judge's order to make the videos public.

The case, which began during the presidency of Barack Obama, balanced freedom of the press against national security.

Noting that the 32 videos had been classified as secret, the court said in its ruling that the president had a "constitutional duty to prevent our government's secret information from seeing the light of day, in judicial proceedings or otherwise."

An attorney for several news organizations that had sought the videos' release, David Schulz, called the ruling "troubling" and said he was weighing further steps. The Department of Justice declined to comment.

The case began in 2005 when the former prisoner, Syrian national Abu Wa'el Dhiab, sought to challenge his detention at the prison on the U.S. naval base in Cuba.

Dhiab said the practice of being forcibly removed from his cell, restrained and force-fed through a nasal tube was illegal and abusive. He was released from Guantanamo in 2014 and transferred to Uruguay.

Authorities recorded Dhiab's force-feeding in order to train guards on how to handle such situations, court papers said.

During the litigation, Dhiab's lawyer obtained some of the videos and filed them with the court under seal.

In 2014, 16 news media organizations, including the Associated Press, The New York Times Co, and Reuters, a subsidiary of Thomson Reuters Corp, intervened in the case. They argued that, under the U.S. Constitution's First Amendment - which guarantees freedom of speech and the press - the public had a right to see the videos, now part of a court record.

A federal district judge in Washington originally ordered the videos unsealed in 2014, with redactions to protect the identities of government personnel. The Obama administration appealed.

The government argued that disclosure could increase the risk of detainees and outside militants developing measures to counter guards' techniques. The material could also be used to incite violence against American troops and as propaganda to recruit militant fighters, the government said.

In its Friday decision, the appeals court ruled there were no First Amendment grounds for releasing the videos. "The government's interest in ensuring safe and secure military operations clearly overcomes any qualified First Amendment right of access," the court said.

The case is Dhiab v Trump, in the U.S. Court of Appeals for the District of Columbia Circuit, 16-5011.