(CNN) At least 3,000 arrests in the past decade are under review in San Francisco in a widening scandal over how police officers allegedly wrote racist and homophobic text messages.

San Francisco’s top prosecutor has impaneled a trio of retired, out-of-town judges to see if bias led to wrongful prosecutions or convictions in thousands of cases investigated by a total of 14 officers.

Prosecutors have already dismissed charges in some cases involving the officers, District Attorney George Gascon said Thursday at a news conference.

San Francisco’s police chief has proposed firing eight officers implicated in the scandal, including a police captain and a sergeant, the San Francisco Chronicle reported last month. Three of the officers have resigned, the newspaper reported.

The panel of retired judges joins a task force in Gascon’s office already investigating the city police department and the county sheriff’s office after federal prosecutors revealed text messages among police officers including references to cross burnings and a suggestion that it would be OK to shoot a black person because it’s “not against the law to put an animal down.”

That task force is also investigating faulty testing at the DNA crime lab and prize-fighting of inmates in the county jail, Gascon said.

Even one wrongful prosecution is ‘one too many’

The offensive text messages not only fly in the face of the image San Francisco likes to cultivate for itself — that of a loving, inclusive community — but also pose a broader danger to the community, the district attorney said.

“When a police officer engages in misconduct, there are significant implications for public safety and for the public trust, particularly in our minority communities,” Gascon told reporters. “And we must do everything that we can to restore that trust.”

More cases could come under review if the judges decide to widen the scope of their investigation, Gascon said.

“If just one individual was wrongly imprisoned because of bias on the part of these officers, that’s one too many,” Gascon added.

Prosecutors: Texts rife with racist terms

The scandal is playing out amid a nationwide debate over policing in the United States sparked by controversial police shootings and uses of force that have resulted in deaths in communities such as New York, Ferguson, Missouri, and, most recently, in Baltimore.

It has its roots in the 2014 indictments of six police officers after the city’s public defender released videos apparently showing officers taking personal belongings of suspects after a 2009 drug search, according to the Chronicle.

One of the officers, Sgt. Ian Furminger, was convicted in U.S. District Court in December of honest services fraud, civil rights conspiracy and conspiracy to commit theft from a federally funded program.

He was sentenced to 41 months in prison, and sought bail pending his appeal.

In March, federal prosecutors included transcripts of text messages recovered from Furminger’s personal cell phone in a motion arguing against Furminger’s request to remain free pending his appeal, saying they offer insight into his character.

In one text, according to the government’s motion, a correspondent asks Furminger if he celebrates Kwanzaa, the December holiday honoring African culture. He responds, “Yeah we burn the cross on the field! Then we celebrate Whitemas,” according to the motion.

In another text, Furminger exchanged text messages with another San Franscisco police officer about a black man married to a friend of his wife. The couple was visiting their home at the time.

“Get ur pocket gun. Keep it available in case the monkey returns to his roots,” the unnamed police officer texted Furminger, according to the government motion. “Its [sic] not against the law to put an animal down.”

“Well said!” the government says Furminger replied.

Furminger also allegedly called another officer a “f-g,” called a black officer a “f—–n n—-r,” according to CNN, and made derogatory comments about Mexicans and Filipinos.

While San Francisco has not seen the kind of widespread protest over police actions seen in other communities after controversial use-of-force cases, the text messages bring to light a “culture of sickness” within the Police Department, said the Rev. Amos Brown, a San Francisco pastor and national board member of the NAACP.

“We cannot claim with integrity and honesty that we are a first-class, inclusive, loving city,” Brown said.

He said the community has “far too many times been mute, silent and indifferent in the face of injustice,” citing statistics that blacks made up more than half those incarcerated in the city while only making up about 5% of the population.

Gascon said he hoped the judges would complete their investigation by the end of the year, but said they would be given as much time as they need to do their work.