Prosecutors in the Michael Jackson trial cannot call a domestic violence expert to explain the behaviour of his accuser's mother on the witness stand.
Mr Jackson has denied all charges
An expert on battered women was to have testified that Janet Arvizo may have lied under oath because she had been battered by her ex-husband.
But Judge Rodney Melville said the testimony would not be relevant.
Mr Jackson is accused of molesting 13-year-old Gavin Arvizo in 2003. He denies all 10 charges against him.
The prosecution had hoped the expert witness would explain the behaviour of the accused mother's during her five days in court.
The defence said it will present evidence that Mrs Arvizo committed perjury during the trial.
Janet Arvizo's testimony will be called into question by the defence
During her combative and rambling testimony earlier this week, Mrs Arvizo admitted to lying under oath in an earlier lawsuit.
"This is not because she's a battered woman, it's because she lies for gain," said defence lawyer Robert Sanger.
The judge also ruled out lurid testimony from a former security guard who alleges he saw Mr Jackson in his bedroom with a young boy.
Both rulings were setbacks for the prosecution, which is in the final stages of presenting its case.
Earlier on Thursday, former security guard Brian Barron gave evidence on the Arvizo family's movements at Mr Jackson's Neverland ranch.
The family claims the singer held them at the ranch to get them to refute a documentary in which he admits letting children sleep in his bed.
But one of the logs shows the entire family left the ranch and returned several hours later.
Janet Arvizo, Gavin's mother, told the court that she took the family for an unnecessary trip to an orthodontist in an attempt to escape.
Police officer Brian Barron worked as a guard at Neverland
However, Mr Barron also testified that Gavin was for a time not allowed to leave the property.
Mr Barron said a note to this effect was posted on a board in the ranch's guard house for about a week in 2003.
"Can you tell me based on your experience and training at Neverland, who would have the authority to make such an [order]?" a member of the prosecution team asked Mr Barron.
"Ultimately, Mr. Jackson," replied Mr Barron.
Prosecutors say this evidence supports allegations that the Arvizo family were held against their will at the ranch.
Mr Jackson faces up to 20 years in jail if convicted of the charges.