Defense Secretary Donald H. Rumsfeld, in an unannounced visit to Iraq on Thursday, declared that allegations of prisoner abuse by U.S. soldiers were "a body blow to us" but vowed that those responsible would "be brought to justice."

Traveling with Air Force Gen. Richard B. Myers, chairman of the Joint Chiefs of Staff, Rumsfeld spent about seven hours in Iraq. He visited Abu Ghraib prison, the U.S.-run facility at the center of recent allegations of abuse, gave two speeches and attended a series of meetings.

Rumsfeld arrived in Baghdad at about 1 p.m. as part of a hastily planned trip to give U.S. troops a pep talk and get briefed by generals about conditions at Abu Ghraib. Military officials said they learned about Rumsfeld's visit about two days before he arrived and that it was kept secret for security purposes.

Rumsfeld told reporters aboard an Air Force E-4B jet that his trip was not intended to quell Iraqi concerns about the abuses, but he spent much of his time in the country addressing the issue. Lt. Gen. Ricardo Sanchez, commander of U.S. forces in Iraq, said he spoke to Rumsfeld in "the broadest terms" about the situation. Rumsfeld was also given a detailed briefing by Maj. Gen. Geoffrey D. Miller, who supervises detainee operations in Iraq.

In speeches to hundreds of U.S. troops, one in a sweltering hall at the edge of Abu Ghraib and the other beneath an ornate chandelier in the marble foyer of a palace once used by ousted president Saddam Hussein, Rumsfeld repeatedly said that he had faith in U.S. troops and that the abuse allegations should not irreparably damage morale.

"In recent months, we've seen abuse here under our responsibility, and it's been a body blow for us," Rumsfeld said at Abu Ghraib. "It doesn't represent America. It doesn't represent American values. It doesn't represent the values of you here in this room."

"The people who engaged in abuses will be brought to justice," the secretary said. "The world will see how a free and democratic society functions."

In southern Iraq, meanwhile, U.S. forces continued to skirmish with militiamen loyal to Shiite Muslim cleric Moqtada Sadr, news services reported. Large explosions were reported in the Shiite holy cities of Najaf and Karbala, but it was unclear what had caused them.

West of Baghdad, near Fallujah, roadside bombs killed a Marine, the U.S. military reported. Authorities also said a soldier and a Marine died Wednesday of wounds in Sunni Muslim-dominated areas.

Rumsfeld's visit to Iraq occurred a day after members of Congress viewed photographs and video clips of prisoner abuse by U.S. military police, soldiers and civilian contractors hired by the government to perform interrogations.

Rumsfeld said lawyers are advising against the release of any more pictures of prisoners being abused, but he rejected the notion that withholding them would suggest a coverup.

"I've stopped reading newspapers," Rumsfeld told the troops. "You've got to keep your sanity somehow. I'm a survivor."

Detainees at Abu Ghraib, who have access to radios in their massive tent enclosures, appeared to know that Rumsfeld might be coming. They streamed to the concertina-wire fences, their raggedy clothes flapping in a hazy wind, and many displayed thumbs-down gestures as Rumsfeld's convoy moved slowly past.

Two detainees held up a cloth on which "What are you going to do about this scandal?" was written in English. "Help," another sign said.

Injured detainees, many of them hit by mortar rounds that have pounded the Camp Ganci portion of the prison, waved crutches, and one displayed a bandaged stump of a leg.

As part of an effort to avoid abuses at the prison, Miller said he had separated commands for military intelligence and military police. An internal Army investigation presented to Congress this week detailed the overlap between the units and alleged that weak leadership contributed to the abuses in two wings of the prison.

Many inmates who had been seen as important sources of intelligence have been removed from those wings, 1A and 1B, in the past few months. The wings now hold about 20 prisoners, including five women whom authorities want to keep separate from the male-populated main compound for safety reasons.

Many of the generals and current commanders at Abu Ghraib agreed with Rumsfeld's contention that leadership failures within the 800th Military Police Brigade and the 205th Military Intelligence Brigade led to a serious breakdown in standards and values, ultimately leading to the abuse. Miller called the situation a "simple leadership failure," and Sanchez attributed the abuse to a lack of training, discipline and leadership.

Col. David E. Quantock, commander of the 16th Military Police Brigade, based at Fort Bragg, N.C., said he found serious problems at Abu Ghraib when he took command of detention operations there in late January.

"Leadership oversight was not in place when I took over," Quantock said in an interview. "The door was open for abuses. We had soldiers we put trust in who didn't deserve that trust."

In his comments to reporters, Rumsfeld said the Geneva Conventions were in effect in Iraq during and after major combat operations last year. He also said instructions approved by President Bush and cleared by Pentagon lawyers made clear that prisoners should be handled in a way that conformed with international standards for the humane treatment of detainees.

"The test is what is decided and what is issued, and then is it adhered to," Rumsfeld said. "And what we know is that the lawyers cleared what was issued down through the system. What we can't know at any given moment of every day is whether each person is executing them consistent with what was approved by the lawyers down through the system."

In addition to his visit to Abu Ghraib, Rumsfeld held a town hall meeting with soldiers in Baghdad. During the session, he congratulated troops for their efforts to liberate the country.

Defense Secretary Donald H. Rumsfeld walks with Maj. Gen. Geoffrey D. Miller, head of Iraq detainee operations, on a tour of Abu Ghraib prison.Defense Secretary Donald H. Rumsfeld greets soldiers at Abu Ghraib near Baghdad. "It doesn't represent America," he said about the prison abuse scandal. A U.S. Marine surveys an area near Fallujah where roadside bombs killed one Marine and wounded several others.