NORTHAMPTON – In a ruling that could be crucial to the case, a Hampshire Superior Court judge said Friday that she will allow instant message exchanges that appear to include an admission by David Fried Oppenheim that he had sex with an underage girl.

In a pretrial hearing Friday, a potential witness in the case told Judge Mary-Lou Rupp that Oppenheim described having sex with the alleged victim shortly before she turned 14.

Oppenheim, 37, the founder of the Pioneer Arts Center of Easthampton, is charged with four counts of child rape. Prosecutors said he had sex with the girl over a period extending from 2005 to 2007, when she was under the legal age of consent.

The witness told Rupp he now identifies himself as a man but was born female and considered himself bisexual when he had the electronic exchange with Oppenheim in 2008. He worked in the café at PACE and had conversations both in person and online with Oppenheim, he said.

During more than an hour of testimony, the witness said he had a crush on the alleged victim and that Oppenheim hinted during an in-person conversation that he knew the girl intimately. Later, during an Internet exchange, Oppenheim told the witness he would describe his sexual encounter with the witness undressed and touched himself. The computers were set up so that Oppenheim could see the witness, but not vice versa, the witness said.

The witness testified that he did what Oppenheim asked and that Oppenheim then described the sexual encounter.

The witness said he also had sex with Oppenheim and that Oppenheim asked to engage in a threesome with the witness and his then boyfriend, but the witness declined. Prosecutor Linda Pisano said later that the witness was 16 when he had sex with Oppenheim but that there are no charges in this case stemming from the relationship.

Defense lawyer David P. Hoose asked Rupp to exclude the instant messaging evidence, saying that anyone could have hacked into Oppenheim’s computer and posed as him. However, the witness said Oppenheim referenced a number of things that they had talked about person-to-person in the Internet exchanges.

Oppenheim used the screen name “Ally,” while the witness used the name “he-she-zee-me,” the witness testified. He said Oppenheim had originally gone by the name “David L. Fried” but asked the witness to change the identifying name on his computer to a girl’s name so the witness’s parents would not become suspicious. Oppenheim suggested the names “Julia,” “Susan,” and “Ally.” The witness chose “Ally.”

The witness testified that he had had dinner at Oppenheim’s house with Oppenheim and his wife, Sonia. He said Oppenheim told him he seldom had sex with his wife.

Although the case law is evolving regarding the admissibility of Internet correspondence, Rup said the messaging text meets the threshold. However, she reserved the right to exclude some of the content.

Earlier in the day, Rup denied a motion to admit a conversation between Oppenheim and a female acquaintance in which they talk about the charges against him. According to Pisano, when the woman asked why he didn’t plead guilty Oppenheim replied that he didn’t want to spend the rest of his life in jail. Hoose argued that the exchange did not prove consciousness of guilt.

The prosecution hopes to present testimony by several other girls that they had sex with Oppenheim. Hoose, meanwhile, has asked for any evidence the prosecution has that those witnesses made conflicting statements about having sex with Oppenheim. Jury selection in the trial is scheduled to begin Monday.