Jurors in Bill Cosby's sex assault retrial will not hear why the case was initially dropped four weeks after his accuser came forward in 2005.
Judge Steven O'Neill sided with prosecutors in ruling that ex-District Attorney Bruce Castor's opinions are irrelevant.
Mr O'Neill also barred mention of a 2015 election that Castor lost to current DA Kevin Steele, whose ads criticised him for not charging Cosby.
Opening statements in Cosby's retrial will start on Monday.
Mr Castor wrote in a 2005 press release the case was too flawed and that both Cosby and accuser Andrea Constand, who waived her right to anonymity, could be portrayed "in a less than flattering light".
His successors reopened it in 2015 after Cosby's decade-old testimony from Ms Constand's civil suit was unsealed.
- Press Association