From the moment he saw glamorous actress Lana Clarkson's dead body slumped in a chair in Phil Spector's mansion, a gun at her feet and blood soaking her short black dress, the lead investigator in the case thought her killing "had sexual overtones," the detective testified Wednesday in the record producer's murder trial.

Sheriff's homicide Detective Mark Lillienfeld testified that when he found a Viagra pill in Spector's briefcase it intensified his belief and he seized it as evidence.

"I thought at that time as I do today that this murder had sexual overtones to it," said the detective "and that the Viagra would prove or disprove certain facts."

It was the first time in the 6-week-old trial that any witness had mentioned sex as a possible motive for Clarkson's death.

Clarkson, 40, went home with Spector on Feb. 3, 2003, after closing time at the House of Blues where she worked as a hostess. Two hours after they arrived at his castle-like mansion, she was dead, slumped in a white French Provincial chair in the foyer. She had been shot through the mouth. Prosecutors contend Spector shot her; the defense says she shot herself.

Prosecutor Pat Dixon first elicited testimony about Viagra in the briefcase on Tuesday as he had the detective enumerate all the items Spector had been carrying. He said the Viagra container held one pill and there were two empty slots.

Questioning the detective again Wednesday, he asked Lillienfeld to explain his suspicions of a sex crime. The witness described a romantically set scene in the elaborate living room of Spector's home which jurors have seen in pictures.

"The home was dark. There were candles lit on the fireplace. There was alcohol out in front of the fireplace on a coffee table," he said. And someone had left a nearly empty brandy snifter in the bathroom, he noted, along with a pair of false eyelashes.

"Miss Clarkson," Lillienfeld continued, "the way she was dressed, the person that she was, the person that the defendant was — all those facts in my mind played into a sexually motivated murder and the Viagra was a piece of evidence that would perhaps prove later on to be important."

Defense attorney Bradley Brunon had raised the issue earlier, apparently anticipating Lillienfeld's statements.

"Do you have any evidence whatsoever that Mr. Spector took Viagra that night?" Brunon asked.

"I do not," the detective said.

Noting that Lillienfeld examined Clarkson's clothing, Brunon asked, "You didn't find any tears or rips associated with someone tearing at her or pawing at her?"

"I did not," said Lillienfeld.

The attorney attempted to ask about the results of a rape examination of Clarkson but the witness said he did not know. Jurors have already heard that the examination was negative.

Brunon also asked if blood tests conducted on Spector the day of the shooting showed any Viagra in his system. Lillienfeld said he did not know and acknowledged he did not ask for a test to determine that.

"Up until even today you haven't inquired of your scientific services or the coroner's toxicology department or anybody else whether or not there is a blood test for Viagra," Brunon asserted.

"I'm unaware if there is or is not," the detective said.

"But the reason you're unaware is because you made no efforts to become aware, right?"

"Correct," the detective said.

"So ... the possibility of some sort of sexual activity was a state of mind you had upon your initial examination of the scene, right?" Brunon asked.

"Correct," Lillienfeld said.

On another issue, Brunon sought to show that a noisy fountain may have obscured a statement by Spector to a waiting chauffeur, who has testified that the words were, "I think I killed somebody." Lillienfeld said he had no trouble hearing anyone when the fountain was running.

Under prosecution questioning he also said a test was done to see if a gunshot could have been heard by the chauffeur, who was seated in a car parked in the mansion motorcourt with the windows up, the radio playing and the air conditioning on.

"The results were you could clearly hear the gunshot from anywhere on the property," he said. "It was clearly audible. It was loud."

Spector, 67, rose to fame with the hit-making "Wall of Sound" recording technique in the 1960s. Clarkson was best known for her role in the 1985 movie "Barbarian Queen."