 -- Bill Cosby's lawyer said Tuesday that his client has been the victim of "racial bias and prejudice" as the sexual assault allegations against him have played out in the court of public opinion.

The statement —- which targeted lawyer Gloria Allred, who has represented some of the women who accused Cosby of sexual misconduct —- came as a trial date of June 5, 2017, was set this afternoon in the comedian's Pennsylvania sexual assault case.

"Mr. Cosby is no stranger to discrimination and racial hatred, and throughout his career Mr. Cosby has always used his voice and his celebrity to highlight the commonalities and has portrayed the differences that are not negative — no matter the race, gender and religion of a person," his lawyer Brian McMonagle told reporters outside the courthouse.

"Yet over the last 14 months, Mr. Cosby and those who have supported him have been ignored while lawyers like Gloria Allred hold press conferences to accuse him of crimes for unwitnessed events that allegedly occurred almost a half-century earlier.

"The time has come to shine a spotlight on the trampling of Mr. Cosby's civil rights. Gloria Allred apparently loves the media spotlight more than she cares about justice. She calls herself a civil rights attorney, but her campaign against Mr. Cosby builds on racial bias and prejudice that can pollute the court of public opinion. And when the media repeats her accusations — with no evidence, no trial and no jury — we are moved backwards as a country and away from the America that our civil rights leaders sacrificed so much to create."

Allred fired back in a statement obtained by ABC News, in which she said that Cosby "appears desperate."

"With his latest pathetic attack on me, he unsuccessfully tries to portray himself as a victim rather than as a defendant in a criminal case accused of aggravated indecent sexual assault. This latest tactic will not work," she stated. "He complains about racial bias but what about the African American women whom I represent who accuse him of sexual assault or rape and who refuse to remain silent about what they say they have suffered? I think they deserve a voice and I am proud to represent them. This is not an issue of racial bias. Instead, it is an issue of whether or not Mr. Cosby has committed acts of gender sexual violence."

Dozens of women have come forward and accused Cosby of sexual misconduct over the past several years. His legal team has vehemently denied the accusations, and he was charged only in the Pennsylvania case.

"Mr. Cosby stated that he is not giving up the fight for his rights and I can assure him that I will continue to fight to protect my clients and their rights," Allred continued. "Victims deserve justice and I am honored to represent them."

He has been in and out of pretrial hearings since Kevin Steele —- at the time, Montgomery County's first assistant district attorney and now its DA — brought charges against Cosby in December, stemming from an alleged incident that occurred a decade earlier.

The three counts of felony aggravated indecent assault against Cosby stem from an alleged 2004 incident, in which accuser Andrea Constand, an employee of Temple University at the time, claims Cosby drugged and molested her.

No charges were filed when she went to police the next year, and Cosby has maintained his innocence. In July, Judge Steven O'Neill ruled that Constand won't have to testify at preliminary hearings for the case.

Cosby admitted a decade ago during a deposition for a civil suit filed by Constand that he gave her Benadryl and said that anything that happened at his Pennsylvania home was consensual at that time. Constand and Cosby eventually settled the civil suit for an undisclosed amount.

Cosby's legal team has tried to have the assault charges dismissed, but in a pretrial hearing on May 24, the judge ruled that the case would move forward.

The Associated Press contributed to this report.