A hooded man standing on a box, electrodes wired to his fingers. A naked prisoner lying on a cement floor, a leash around his neck held casually by an American soldier. The bloody bodies of dead inmates with their heads bashed in.

Ten years later, the photos leaked from Abu Ghraib prison in Iraq remain seared into the American consciousness. But while the United States government was unable to prevent their release, more than 2,000 other photos taken at various American military facilities in Iraq and Afghanistan have remained hidden under a 2009 law. By one account, the images — which officials say are a mix of snapshots by soldiers and photos by military investigators documenting allegations of abuse — are “worse than Abu Ghraib.”

On Wednesday, the American Civil Liberties Union won an important victory for transparency when a federal district judge in New York City, Alvin Hellerstein, rejected the government’s blanket claim of privilege for all the photos. Judge Hellerstein ordered the government to show why the release of the photos would endanger American lives, and to show that it had considered each photo individually.

President Obama agreed to the photos’ release after taking office in 2009 but changed his mind after pleas from military officials and Iraqi Prime Minister Nuri Kamal al-Maliki. The 2009 law — the Protected National Security Documents Act — created a three-year exemption from the requirements of the Freedom of Information Act.