Barack Obama has been accused of betraying a commitment to transparency after backing away from an agreement to swiftly release dozens of photographs showing US soldiers abusing prisoners in Iraq and Afghanistan.

The president is seeking to overturn a deal made last month between the Pentagon and the American Civil Liberties Union to make public the pictures from Abu Ghraib and other prisons after a court ruled they should be released.

Obama instructed the White House legal office to argue in court against the immediate release of the photographs after several senior military officers, including the former US commander in Afghanistan and Iraq, General David Petraeus, and the present commander in Baghdad, General Ray Odierno, said their publication would endanger US troops.

Obama today denied there is any cover up but said that the release of the pictures would only fuel hostility to the US.

"Publication of these photos would not add any additional benefit to our understanding of what was carried out in the past by a small number of individuals," he said. "The most direct consequence of releasing them I believe would be to further inflame anti-American opinion and put our troops lives in danger."

The president insisted that the pictures being withheld are "not particularly sensational" especially when compared to the ones from Abu Ghraib that created an international outcry when they revealed US soldiers humiliating and taunting Iraqi prisoners, some of whom were naked or hooded.

But questions remain as to why the administration has changed its mind after originally agreeing to release the images. Speculation is likely to centre on reports that some of the pictures are of even more serious abuses than those already revealed.

Two senior senators, Joseph Lieberman and Lindsey Graham, also put pressure on the president not to release the images.

"The release of these old photographs of past behaviour that has now been clearly prohibited can serve no public good, but will empower al-Qaida propaganda operations, hurt our country's image, and endanger our men and women in uniform," they wrote to Obama.

The Pentagon originally agreed to release 44 photographs on 28 May after the ACLU won a federal court ruling under the freedom of information act that they be made public. The administration also told the judge it was "processing for release a substantial number of other images".

The ACLU argued that the pictures should be made public so that Americans understood the nature and scale of the abuses, and so that the officials responsible could be held accountable.

Amrit Singh, the ACLU lawyer who argued the case said: "The decision to not release the photographs makes a mockery of President Obama's promise of transparency and accountability."