The Obama Administration has been given a December deadline to explain why it has withheld more than 2,000 graphic images depicting Iraqi and Afghanistan detainees being tortured by the US military.

A federal judge has ordered the US government to explain, one photograph at a time, why it blocked the images from being released to the public.

In addition to the photographs of hooded, naked and abused prisoners inside the infamous Abu Ghraib prison in Iraq, which caused global outrage during the George W Bush era in 2004, a further 2,100 images showing possibly even more disturbing examples of torture and humiliation could also be released.

Federal Judge Alvin Hellerstein has given the US Justice Department until 12 December to give a rational explanation why each individual photograph has been withheld from the public.

After Hellerstein has heard the reasoning from the government, he will decide how many will be released, if any at all.

In 2009, President Barack Obama said the reasoning for blocking the release of the images was on the grounds they would "further inflame anti-American opinion" and "put our troops in greater danger".

Two former US secretaries of defense, Robert Gates in 2009 and Leon Panetta in 2012, also maintained the disclosure of the images would place US troops in Iraq and Afghanistan lives at risk.

The US military returned to Iraq this year as part of the ongoing battle against Isis (Islamic State), prompting further fears about the repercussion the release of the images might hold.

Marcellene Hearn, an attorney for the American Civil Liberties Union (ACLU), said it is important that the US government disclose the actions of the military for transparency purposes.

"The American people are entitled to know what took place in US detention centres," she said.

"And it would be completely backwards to suppress images of government misconduct on the grounds that they are too powerful to be disclosed when it is often disclosure, accountability and ensuing reforms that prevent misconduct from recurring."