The American Civil Liberties Union (ACLU) had spent years pursuing the government in the courts to obtain the pictures.

In depth

  Video: Abuse 'unprecedented'
  Obama blocks abuse images

The US department of defence was to release the images by May 28 in response to legal action filed by the ACLU.

But Barack Obama, the US president, said the government would appeal the legal ruling ordering the release of the photos, in effect blocking their release.

"The most direct consequence of releasing them, I believe, would be to further inflame anti-American opinion and to put our troops in greater danger," Obama said in May.

"Moreover, I fear the publication of these photos may only have a chilling effect on future investigations of detainee abuse."

The ACLU said on Thursday it was disappointed by the ruling.

"It further delays the disclosure of photographs that are critical to informing the debate about the treatment of US prisoners,'' said ACLU lawyer Amrit Singh.