WASHINGTON (CNN) -- U.S. Attorney General Eric Holder said Thursday the Justice Department is prepared to defend in court President Obama's decision to oppose the release of Defense Department photos showing alleged abuse of detainees.

Photos were leaked in 2004 showing U.S. troops abusing detainees at Abu Ghraib prison in Iraq.

Testifying before the House Judiciary Committee, Holder repeated Obama's assertion that the decision to oppose the photos' release had been made "consistent with the best interests of our troops."

Holder emphasized Obama's conclusion that making the photos public would endanger U.S. troops and have a "negative impact" on the military situation in Iraq and Afghanistan.

Obama expressed concern Wednesday that a release of the photos could "inflame anti-American opinion" and have a "chilling effect" on further investigations of detainee abuse without adding to the understanding of past abuses.

Before Obama's announcement, the Pentagon was set to release hundreds of photographs of prisoners in detention facilities in Afghanistan and Iraq by the end of the month. iReport.com: Obama right on photo decision?

The release initially was scheduled in response to a Freedom of Information Act request by the American Civil Liberties Union. A lawsuit was filed in 2004 after the Bush administration denied the ACLU's request. The 2nd Circuit U.S. Court of Appeals ruled last year the photos should be released.

The move would have followed Obama's decision to release Bush-era CIA documents showing that the United States used techniques such as waterboarding. Watch more on the dispute over the photos »

Images leaked to the news media in 2004 showing prisoner abuse caused outrage around the world. Detainees at the Iraqi military prison formerly called Abu Ghraib were photographed in degrading positions, as Americans posed next to them smiling. The images showed naked prisoners stacked on top of each other, or being threatened by dogs, or hooded and wired up as if for electrocution.

Obama said Wednesday that the photos he wants to withhold "are not particularly sensational, especially when compared with the painful images that we remember from Abu Ghraib, but they do represent conduct that didn't conform with the Army manual."

"The 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. "In fact, the most direct consequence of releasing them would be to further inflame anti-American opinion and to put our troops in greater danger."

ACLU attorney Amrit Singh said that the decision "makes a mockery" of Obama's campaign promise of greater transparency and accountability.

"Essentially, by withholding these photographs from public view, the Obama administration is making itself complicit in the Bush administration's torture policies," Singh said.

Singh said the ACLU is prepared to "do whatever it takes" to have the photos released.

On other subjects, the attorney general:

Indicated that the Justice Department has begun a review of the disparity in sentencing policies for crack versus powdered cocaine;

Said he does not know where the 241 detainees at Guantanamo Bay, Cuba, ultimately will be placed, but that the government would not "release [or transfer] anybody who would pose a danger to the American people";

Promised Justice Department officials will follow the evidence and law to determine whether Bush administration officials would be prosecuted for torture;

Asserted that he has "a fundamentally different view" from the Bush administration on the question of whether a president has the ability to detain an individual indefinitely without filing charges.

"The notion that a president in an unfettered way ... has [the ability to detain someone] is not something we agree with," Holder said.

"Without being tied to some statute, some international agreement ... I do not believe the president has that power."

All About Eric Holder • Barack Obama • Abu Ghraib