NORRISTOWN, Pa. (AP) — Bill Cosby wants a Pennsylvania judge to step down from his case days before sentencing on sex assault charges.

A defense motion Tuesday accuses Montgomery County Judge Steven O’Neill of having a longtime grudge against a key witness in a 2016 pretrial hearing.

READ MORE: Authorities Searching For Man Who Escaped From Northern Minnesota Corrections Facility

The witness, ex-prosecutor Bruce Castor, says he declined the case in 2005 and promised Cosby that he could never be prosecuted over the 2004 encounter with a woman at his home.

O’Neill found no evidence of a binding agreement and sent the case to trial.

Cosby faces sentencing Sept. 24 after he was convicted of three felonies this spring.

READ MORE: Vikings Assistant Head Coach Mike Pettine Leads Coaching Diversity Workshop

He faces up to 10 years in prison on each count.

O’Neill’s office did not immediately return a call for comment.

Camille Cosby in a separate statement Tuesday calls O’Neill’s alleged bias in her husband’s case a “horrible injustice.”

MORE NEWS: Baby Formula Shortage: Biden To Invoke Defense Production Act (CBS NEWS)

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)