The U.S. must release a cache of photos showing the abuse of detainees in military custody, unless lawyers for the Department of Defense successfully appeal a federal judge's ruling handed down Friday, within 60 days.

U.S. District Judge Alvin Hellerstein's ruling is the latest development in a legal case that has gone on for over a decade. The plaintiff in the case is the American Civil Liberties Union (ACLU), which has sought the release of the photos under the Freedom of Information Act.

The photos include images showing detainees in U.S. military custody being abused in both Iraq and Afghanistan, including at the controversial Abu Ghraib prison. They have been suppressed by the government via the use of the Protected National Security Documents Act, which allows documents to be exempted from freedom of information laws if their release would endanger American citizens or military personnel.

Hellerstein's ruling, however, rejected the Department of Defense's block classification that all images in this collection would endanger Americans, saying that arguments for each individual photo had to be made, and that the government had not established the Secretary of Defense's “own basis for concluding that disclosure would endanger Americans.”

Though he stayed his order for 60 days at the request of the Department of Defense, in order to give them time to consider an appeal, he commented that the government had already had “ample time to evaluate its legal position and the desirability of an appeal.” He also alluded to comments he made last month, in which he asserted that the government's conduct in the case was aimed at obtaining “a very substantial delay” in its progress.

"The photos are crucial to the public record," ACLU Deputy Legal Director Jameel Jaffer said in a news release, cited by Reuters. "They're the best evidence of what took place in the military's detention centers, and their disclosure would help the public better understand the implications of some of the Bush administration's policies."

In earlier court filings, military figures expressed concern that the militants of the Islamic State group might benefit from the images' disclosure.

ISIS "would use these photographs to further encourage its supporters and followers to attack U.S. military and government personnel," Navy Rear Adm. Sinclair Harris, the vice director for operations for the Joint Chiefs of Staff, said in a December 2014 court filing, cited by the Associated Press. The Department of Defense is studying the ruling and will make any further responses in court, spokesman Lt. Col. Myles Caggins III told the agency.