US Secretary for Defence Leon Panetta has apologised for photographs that appeared in a newspaper of soldiers posing with the maimed bodies of dead Afghan insurgents.

"This is war, and I know war is ugly, and is violent. And I know young people sometimes caught up in the moment make some very foolish decisions," Mr Panetta told a news conference during a meeting of NATO allies in Brussels.

"I am not excusing that."

He added: "My apology is on behalf of the Department of Defense and the US government.

"Again, that behaviour is unacceptable."

Mr Panetta said he regretted the decision of the Los Angeles Times to publish some of the photos, which he said might trigger retaliatory violence against foreign soldiers stationed in Afghanistan.

"Neither do I want these images to bring further injury to our people, or our relationship with the Afghan people. Those kinds of photos are used by (the) enemy to incite violence, and lives have been lost as a result," he said.

Meanwhile, US President Barack Obama wants an investigation into the photographs and that those responsible be held accountable, the White House has said.

"The conduct depicted in those photos is reprehensible," White House spokesman Jay Carney told reporters.