The detective at the center of a pretrial hearing in the Michael Jackson (search) molestation case has something in common with the pop singer's young accuser: They were both patients of the same psychologist, Jackson's lawyer alleged Tuesday.

The therapist, Stan J. Katz (search), declined to elaborate on his relationship with private investigator Bradley Miller, citing confidentiality. The judge upheld his decision to keep mum, at least temporarily.

Katz was the one who first notified police of the 12-year-old boy's accusations of sexual abuse by Jackson.

Jackson, 45, is charged with committing a lewd act upon a child, administering an intoxicating agent and conspiring to commit child abduction, false imprisonment and extortion. He has pleaded not guilty and is free on $3 million bail.

His trial is set for Jan. 31.

Jackson defense attorney Brian Oxman (search), who made the allegation, asked for the chance to argue that the material is not privileged, and the judge gave him time to find case law on the subject.

The surprising claim came a day after a dramatic courtroom duel unfolded — with prosecutor Tom Sneddon (search) on trial in his own case against Jackson.

At issue in the unusual hearing are investigation tactics employed by the Santa Barbara County district attorney in the weeks before he raided the pop superstar's Neverland Ranch (search) and arrested Jackson in November.

Katz had been called as a witness in a hearing to determine whether Sneddon and other authorities were aware that Miller worked for Jackson's former lawyer, Mark Geragos (search), when evidence was seized from Miller's office with a search warrant.

Sneddon has testified that he was unaware of the relationship and thus was not invading the attorney-client privilege of confidentiality when he went to Miller's office and conducted surveillance.

During Tuesday's testimony, Katz acknowledged that he had been professionally associated with Miller before the Jackson case.

"I knew Bradley Miller because he is a professional who has worked on family law cases with me, as you have, Mr. Oxman," he told the lawyer.

"And did you tell investigators (in the Jackson case) that Bradley Miller was your patient?" Oxman asked.

The witness again asserted the privilege.

Oxman, the third defense attorney to question witnesses in the hearing, dropped the bombshell about the psychologist's relationship with the witness at the start of his inquiry.

"Bradley Miller is a very special patient of yours, is he not, Dr. Katz?" asked Oxman.

"If he were a patient, I could not disclose that because of the privilege," Katz replied.

Superior Court Judge Rodney Melville accepted that assertion, but Oxman continued, "Bradley Miller is a patient of Dr. Katz and has been for a number of years."

The judge then told Oxman that he should not be testifying to that fact.

The defense was seeking to show that Katz's intimate knowledge of the investigator would have meant he knew of the relationship with Geragos and probably told authorities about it.

On Monday, Sneddon and Jackson defense attorney Thomas Mesereau Jr. sparred, as the singer and several members of his family looked on. Mesereau appeared snide at times, and Sneddon was characterized as "combative" and "evasive" by some who witnessed the showdown.

Sneddon's demeanor on the stand at one point even brought a scolding from the judge.

The hearing is scheduled to last several more days. The judge is not expected to issue an immediate ruling.

In a typically theatrical entrance, Jackson showed up at court Monday with his parents and several siblings. All the Jacksons wore white.

The singer and his entourage weren't expected to be in court again on Tuesday.

During the opening day's proceedings, Mesereau took the offensive, questioning Sneddon for two hours over the November 2003 search of the office of a private investigator hired by Jackson's former attorney.

The exchanges were testy at times. At one point, Sneddon said he didn't know how the defense wanted him to answer a question. "Truthfully, hopefully," Mesereau replied.

When Sneddon said he could not give a yes or no answer, Melville promptly warned him: "Mr. Sneddon, I'm going to ask you not to spar with the attorney."

Mesereau, arguing Sneddon violated Jackson's attorney-client privilege by searching the investigator's office, is seeking to have evidence gathered during that search excluded from his trial on child molestation charges.

If successful, the move could undermine the prosecution case. It is one of the issues that must be settled before Jackson's trial.

Sneddon refused to acknowledge he even suspected a professional relationship between former Jackson attorney Geragos and Miller — even though the prosecutor acknowledged seeing a large file of letters that carried the names of both men.

"Are you saying you didn't know that Mr. Miller was working for Mark Geragos at the time?" asked Mesereau.

"I am 100 percent certain of that," Sneddon said.

The prosecutor admitted telling defense attorneys in July he knew Miller worked for Geragos but testified he retracted the statement the next day. "It was a mistake," he said.

Sneddon, who tried to bring charges against Jackson in 1993, said he personally took part in surveillance of Miller's office and the search because he happened to be in Los Angeles and wanted to avoid using additional county personnel.

The singer, who wore a gold brocade armband over a white suit, sat perfectly still and stared at the prosecutor. The rest of the Jackson family, including five siblings dressed in white, also sat impassively. They left the courthouse, with a police escort, after Sneddon's testimony.

Jackson's fans erupted in cheers as the singer and his entourage arrived at court in a tan, double-decker bus with tinted windows, and again when they emerged for lunch.

About 100 mostly young fans pressed against a chain-link fence and hoisted signs saying "Our Love is With You" and "Michael Jackson is Innocent" outside the courthouse. Dozens of police and a small group of people demonstrating in support of sexual abuse victims were also at the court.

One Sneddon supporter at the courthouse said the charges Jackson faces are serious.

"This is a child abuse case," Sofia Hollam, one of the prosecutor's supporters, told FOX News. "I think that's getting lost."

FOX News' William La Jeunesse, Catherine Donaldson-Evans and The Associated Press contributed to this report.