Article content continued

If the judge rules against the White House, its lawyers could decide to appeal and set the stage for a protracted legal battle that may one day be settled in the Supreme Court.

The pictures were largely taken by U.S. troops themselves as they posed with prisoners or corpses and were gathered during the course of 203 military investigations in Iraq and Afghanistan.

Some of the pictures are from the Abu Ghraib prison in Iraq, which became infamous after the release of a photograph showing a prisoner with a black hood on his head and electric wires attached to his outspread hands.

Another photo showed a female soldier holding on to a naked Iraqi prisoner using a dog lead. Mr. Obama initially agreed to release additional pictures after taking office in 2009 but reversed course after the Iraqi government warned that it could lead to widespread violence.

His secretaries of defence signed orders in 2009 and again in 2012 blocking their release but a judge ruled in August that the orders were no longer sufficient, given that U.S. forces had largely withdrawn from both Iraq and Afghanistan.

“Three years is a long time in war, the news cycle, and the international debate over how to respond to terrorism,” Judge Alvin Hellerstein wrote.

The American Civil Liberties Union (ACLU) first filed a lawsuit in 2004 seeking information about abuse of detainees at the hands of U.S. troops.

“The public has a right to know what happened in these military detention facilities in the same way it has the right to know what happened in the CIA’s secret prisons,” said Jameel Jaffer, the ACLU’s deputy legal director. “If you give the government the authority to suppress information simply because people may react badly to it, then the government is going to be suppressing a lot more.”

Critics of the Senate inquiry into CIA interrogation techniques warned that its report would leave to violence but the response has so far been muted across the Middle East.