Bill Cosby's defense team on Thursday accused Montgomery County prosecutors of playing "gotcha" with his rights by ignoring what they said was a valid, decade-old agreement not to charge him, even if it was never put in writing.

The District Attorney's Office "cannot rely on the fact that the agreement was not reduced to writing as a basis for shirking its obligation," defense lawyer Brian McMonagle wrote in a filing that again urged a judge to throw out the sexual-assault case against Cosby.

He added: "Oral promises made by prosecutors in exchange for a plea or other consideration from a defendant are routinely enforced like any other oral contractual promise."

The filing - written in response to arguments last week from Montgomery County District Attorney Kevin Steele - set the stage for a pivotal hearing next Tuesday, the first since the 78-year-old comedian was charged with assaulting Andrea Constand, a former Temple University employee, in 2004.

Common Pleas Court Judge Steven T. O'Neill has said he intends to hear testimony and arguments only on the purported non-prosecution deal at the hearing in Norristown.

Steele and his predecessor, Risa Vetri Ferman, who was district attorney when the charges were filed and now is a judge, have said they can find no documentation of any non-prosecution agreement. In a filing last week, Steele accused Cosby of seeking special treatment from the judge.

McMonagle's reply took aim at that argument.

"Mr. Cosby is not asking for 'special treatment,' " he wrote. "He is asking for what any citizen should expect from the government - that the District Attorney's Office will not play 'gotcha' with its citizens' constitutional rights and breach its agreements with them."

McMonagle also renewed a request to disqualify Steele and his office from the case, saying television ads Steele ran while running for district attorney last year crossed ethical lines and have hurt Cosby's chance for a fair trial.

Ads at issue

The spots accused Bruce L. Castor Jr., the former district attorney running at that time to reclaim the office, of not standing up for crime victims, citing his handling of the Cosby investigation in 2005.

Steele has defended the ads, arguing that he only criticized Castor's decision-making and did not promise to prosecute Cosby if he was elected.

McMonagle saw otherwise. "Mr. Steele's TV commercial plainly labels Mr. Cosby a 'sexual predator' and asserts that any failure to prosecute Mr. Cosby was tantamount to 'not looking out for the victims,' " he wrote.

Castor has emerged as a central witness to the defense's other primary argument for having the case thrown out. He is expected to testify Tuesday.

2006 settlement

Having concluded in 2005 that he lacked sufficient evidence to pursue a criminal case against Cosby, Castor has said that he offered the comedian a deal that remains legally binding so Cosby would testify in a civil suit Constand had filed against him over the alleged attack.

That dispute was settled out of court in 2006 for an undisclosed sum, but prosecutors built their current case against Cosby in part on his testimony, transcripts of which were released for the first time last summer.

The case marks the first time Cosby has faced criminal charges, despite allegations from dozens of women nationwide that he drugged and molested them.

If convicted, he could face five to 10 years in prison.