WASHINGTON - Photos of U.S. military personnel burying Osama bin Laden 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 founder of al-Qaeda could cause "exceptionally grave harm" to Americans.

The conservative-leaning group Judicial Watch had been pressing the Pentagon and 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 reviewed the photos and said in court papers that they were "quite graphic" and "gruesome" pictures displaying the bullet wound that killed bin Laden.

"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 of Judges Merrick Garland, Judith Rogers, and Harry Edwards.

Under the Freedom of Information Act, government agencies are exempt from disclosing records in the interest of national defense or foreign policy.

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 report that American soldiers had desecrated the Quran and the publication of a Danish cartoon of the prophet Muhammad.

Judicial Watch president Tom Fitton said the group's lawyers were considering whether to appeal. "The courts need to stop rubber-stamping this administration's improper secrecy," he 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."