A U.S. soldier takes a look at the notorious Abu Ghraib prison.

The government, which has been fighting the release of the images in court for more than decade, has 60 days to decide whether to appeal the ruling by U.S. District Judge Alvin Hellerstein:

Dozens of pictures showing prisoners being abused by U.S. personnel in Iraq and Afghanistan must be released, a judge ruled Friday.

The American Civil Liberties Union (ACLU) filed the lawsuit in June 2004, citing the need to hold the government accountable after reports of prisoner abuse emerged.

ACLU attorneys in their court filings referenced the abuse of detainees in Abu Ghraib, where pictures of the abuse sparked international outrage.

"Photographs and videos leaked to the press have established beyond any doubt that detainees held in Iraq have been subjected to humiliating and degrading treatment," attorneys wrote in their original complaint.

Government officials have argued that releasing the photos could incite attacks against the U.S. A law passed in 2009 would allow the images to remain secret if the secretary of defense certifies that releasing them would endanger U.S. citizens, the Associated Press reported.

But in his ruling filed on Friday, Hellerstein said the Department of Defense failed to provide specific details of the threat.