Photos of American military personnel burying Osama bin Laden at sea will remain classified, a federal appeals court ruled Tuesday.

The U.S. Court of Appeals for the D.C. Circuit sided with the government in finding that the release of postmortem images of the al-Qaeda leader could cause “exceptionally grave harm” to Americans.

Judicial Watch, a conservative-leaning group, had been pressing the Defense Department and the CIA to release at least a subset of 59 photos of bin Laden after he was killed in a May 2011 raid on his compound in Pakistan.

In a 14-page opinion, the three-judge panel wrote that it was persuaded by testimony submitted by national security officials who had reviewed the photos and said that images displaying the bullet wound that killed bin Laden were “quite graphic” and “gruesome.”

Attorneys for Judicial Watch had argued that other seemingly innocuous images that depict a dignified burial at sea were unlikely to cause any damage to U.S. national security. But the court said these weren’t just any photos but “an extraordinary set of images” of U.S. military personnel burying the mastermind of the Sept. 11, 2001, attacks.

“It is undisputed that the government is withholding the images not to shield wrongdoing or avoid embarrassment, but rather to prevent the killing of Americans and violence against American interests,” according to the opinion from Judges Merrick B. Garland, Judith W. Rogers and Harry T. Edwards.

The court made specific reference to other instances in which national security officials said similar disclosures had incited anti-American violence. The officials pointed to uproars over an erroneous magazine report that U.S. troops had desecrated the Koran and the publication of a Danish cartoon depicting the prophet Muhammad.

Under the Freedom of Information Act, government agencies are exempt from disclosing records in the interest of national defense or foreign policy. Judicial Watch argued that such exemptions are too vague, but courts have generally deferred to the executive branch when it comes to classified information.

Judicial Watch President Tom Fitton said the group’s attorneys are considering an appeal.

“The courts need to stop rubber-stamping this administration’s improper secrecy,” Fitton said in a statement. “There is no provision of the Freedom of Information Act that allows documents to be kept secret because their release might offend our terrorist enemies.”

The group had also challenged the process the government used to mark the photos as classified. Although the court acknowledged that it did not have enough information from the CIA to determine whether the agency had followed its own guidelines, the judges deferred to testimony from the head of the agency’s National Clandestine Service, who said he had personally reviewed the images and approved the top-secret label.