Updated

Warning: The following report contains graphic content.

STROUDSBURG, Pa. -- No one disputes that former U.N. chief weapons inspector and prominent Iraq war critic Scott Ritter entered an adult chat room two years ago, traded sexually graphic messages and performed a sex act on himself in front of a webcam.

What the jury in Ritter's online sex-sting trial must decide is whether he thought the person on the other end of the chat was a 15-year-old girl.

A police detective testified Tuesday that Ritter initiated a sexually explicit conversation with him in a Yahoo chat room in February 2009, and that he told Ritter at the beginning of the conversation that he was a 15-year-old girl named Emily.

Barrett Township police Detective Ryan Venneman told jurors that Ritter gave him his cellphone number and began masturbating on a video chat. Ritter briefly shut down the webcam after the detective repeated that he was 15, typing that he "didn't want any trouble," but soon restarted the camera and masturbated to completion, the detective testified.

Prosecutors played an extremely graphic 20-minute video of the encounter for the jury.

In his opening statement, defense attorney Gary Kohlman told the jury that Ritter, a former Marine who served in the 1991 Gulf War, is a "decorated military hero" who didn't believe he was chatting with an underage girl.

"There will not be a shred of evidence that Mr. Ritter in his entire life ever has had an inappropriate conversation with a minor," Kohlman said.

"There is not a shred of evidence that he has ever had or looked at child pornography. ... Ritter at no stage in his chat with Officer Venneman ever once believed that he was doing anything other than speaking and chatting with an adult," Kohlman said.

According to Venneman's testimony, Ritter called the exchange a "fantasy" after the detective identified himself as an undercover officer.

"You know you're in a lot of trouble," Venneman typed, according to a transcript of the chat read in court.

"Huh?" Ritter replied.

"I'm an undercover police officer. You need to call me ASAP."

Ritter immediately denied he had committed a crime, according to the transcript.

"No one under 18 can access this chat room. ... I don't think you're 15. Never did. It was all fantasy ... As far as I know you're a 56-year-old housewife," he typed.

Ritter, 49, of Delmar, N.Y., was the U.N.'s chief weapons inspector in Iraq following the Gulf War. He accused the United States and U.N. of failing to take action when Iraq blocked inspectors from suspected weapons sites and later became an outspoken critic of the Iraq war, insisting the country had destroyed its weapons of mass destruction.

Ritter is charged with unlawful contact with a minor and other counts in the Pennsylvania case.

A decade ago, Ritter was charged in New York with trying to set up a meeting with an undercover police officer posing as a 16-year-old girl. Those charges were later dropped, and Ritter said in 2003 that he believed the case was designed to silence his war criticism.

Monroe County prosecutors told jurors they will hear evidence about that case. But Kohlman said Ritter had been in a "dark period" in his life -- depressed over being called unpatriotic for his criticism of American policy on Iraq -- and drove to the meeting in New York in hopes of getting caught by police.

Ritter is expected to testify in his own defense.