A Tennessee judge resigned last month after making a recording of fantasies so lurid that when the tape fell into the hands of the police and FBI, they thought they were listening to a torture session and believed it might be linked to a murder case.

Ultimately, investigators brought no charges against Circuit Judge John B. Hagler, and police said Wednesday he is not a suspect in any investigation.

But the sensational case has led to allegations of professional retaliation, interdepartmental intrigue and strategic news leaks.

The recording was investigated by authorities more than two years ago, but its existence did not come to light publicly until just a few weeks ago, and details on the contents are only now coming out, at a hearing that began Wednesday on whether police must release the tape.

During those two years, the judge remained on the bench, hearing mostly family court cases like divorces and child custody.

Among the mysteries: Why did he make such a recording? Why is it coming to light just now? And what, exactly, is on the tape?

The tape was briefly examined by Chattanooga police and the FBI in late 2005 after a secretary who had just been fired by Hagler turned it over, authorities said. She told them she found the recording of the judge's voice on a tape that also contained legal dictation.

"It sounded like someone being tortured," Chattanooga police Sgt. Alan Franks testified Wednesday, offering the first details of what is on the tape.

Franks said the recording was investigated in relation to a still-unsolved 1997 murder. He gave no other details on the murder case.

"The content was so shocking. I have been a police officer for 24 years," Franks said before his testimony was cut off by an objection.

Investigators ultimately concluded the recording consisted only of fantasies.

Two years later, the tape made its way to the prosecutor in Hagler's Tennessee district, District Attorney Steve Bebb. Then, last month, the Chattanooga Times Free Press learned about the recording from an unidentified source, and Hagler confirmed it and resigned.

Hagler said that he had done nothing wrong but that the recording had caused great embarrassment to friends, family and the courts. Franks, who is 65 and married, has been a circuit judge in Cleveland, Tenn., since 1990 and served three terms as president of the Tennessee Trial Judges Association.

"The description of it as containing `graphic fantasies' ... is an accurate and sufficient description and all any decent person would want to hear of it," the judge said in a statement.

Bebb, the district attorney, said he, too, concluded the recording was not connected to any crime, but what he heard led him to persuade Hagler, whom he describes as a longtime friend, to resign.

"This would disturb any human being who heard it," Bebb said.

The judge strongly suggested the leak was committed by someone with a grudge against him, perhaps someone he ruled against.

"In my opinion, the real story here, so strongly expressed by an alert and outraged public, is not about me or my sins, but about whether one of our essential public institutions, the judiciary, has been the victim of a retaliatory attack," Hagler said in his statement. He did not elaborate but alluded to a dispute within the local bar association.

The district attorney has disputed speculation the leak was related to the judge's recent ruling against a local sheriff's department's request for more funding.

Members of the local bar have asked federal prosecutors to investigate how the existence of the tape became public. Police said FBI agents are asking them questions about the leak.

The judge is fighting a request by the Chattanooga Times Free Press, The Associated Press and other news organizations that the tape be released. The hearing resumes on Thursday.

Hagler was relaxed and smiling at times during Wednesday's hearing. He said during a break that he had not heard the tape in the hands of police and could not be sure it was the one he recorded. "I hope it's my voice," he said.