An Army dog handler charged with abusing Iraqi prisoners at Abu Ghraib said he was competing with another canine team to frighten detainees into soiling themselves, another soldier testified at the man's court-martial Tuesday.

The testimony on the second day of the trial was the most damaging evidence the government has presented against Sgt. Michael J. Smith.

Sgt. John H. Ketzer, who worked as an interrogator at the prison, testified that he followed the sounds of screaming to a cell where Smith's black Belgian shepherd was straining against its leash and barking at two cowering teenagers in a part of the prison reserved for juveniles and women.

Ketzer said Smith laughed as he told Ketzer shortly thereafter, "My buddy and I are having a contest to see if we can get them to [defecate on] themselves because we've already had some [urinate on] themselves."

Under cross-examination, Ketzer said he had thought Smith was just joking about the contest.

Smith, 24, of Fort Lauderdale, Fla., is accused of using his dog to harass, threaten and assault detainees in late 2003 and early 2004 — the same period during which guards at Abu Ghraib subjected inmates to sexual humiliation and other abuses documented in widely seen photographs.

Smith faces up to 24 1/2 years in prison if convicted on all 13 counts.

In the prosecution's opening statements Monday, Maj. Matthew Miller told jurors Smith and another dog handler, Sgt. Santos A. Cardona, were rogue military policemen.

"We contend that there is no soldier who would honestly and reasonably believe that this conduct was lawful and authorized," Miller said.

Cardona's trial is set for May 22.

Private Ivan L. "Chip" Frederick II, who was convicted in 2004 of abusing Abu Ghraib prisoners, testified that he spoke with the dog handlers about approval from Col. Thomas M. Pappas, who was commander of military intelligence at the prison.

"They said it was all right — Col. Pappas had authorized the use of dogs as long as they wore muzzles," Frederick said.

A defense attorney, Capt. Jason Duncan, said Pappas' instructions were aimed at getting information from a detainee interrogators considered a valuable source — a perception he said came from communications from officials at least as high as Pappas' commander, Lt. Gen. Ricardo Sanchez.

Pappas has been reprimanded and fined for his role in the scandal and is among the potential defense witnesses.

Human rights advocates say the trial could help clarify who approved the harsh treatment that they say amounted to torture. Defense attorneys in other Abu Ghraib cases have argued that the approvals stretched to the Pentagon.

The nine American soldiers convicted so far in the Abu Ghraib scandal have all been low-ranking reservists.

Smith is charged under the Uniform Code of Military Justice with five counts of maltreat of detainees, four counts of assault, two counts of conspiracy to maltreat detainees, one count of dereliction of duty and one count of indecency. The indecency allegation is that Smith had his dog lick peanut butter off the genitals of a male soldier and the breasts of a female soldier while another sergeant videotaped the act.