A judge ruled on Monday that San Francisco police officers can keep their jobs and not face discipline despite being involved in a scandal stemming from racist text messages that forced the review of thousands of criminal cases, court records showed.

The move comes at a time of heightened scrutiny of racism and discrimination by law enforcement following numerous high-profile police killings of unarmed black people across the United States since mid-2014.

ADVERTISEMENT

San Francisco Superior Court Judge Ernest Goldsmith found in favor of officer Rain Daugherty, who filed a lawsuit in May along with several other officers, saying his suspension violated a statute of limitations provided by a police officer’s Bill of Rights.

Goldsmith said the statute “serves to both protect the rights of police officers and to ensure the public’s safety” by requiring that investigations are conducted in a timely manner.

San Francisco City Attorney’s Office spokesman Matt Dorsey said the agency was “disappointed” by the ruling and was exploring possible next steps.

Daugherty did not deny sending “grossly inappropriate texts” but argued in court that an investigation was not launched for roughly two years after the messages were uncovered in 2012 – a year longer than allowed under the statute.

Police Chief Greg Suhr in May moved to have Daugherty and seven other officers fired and six more disciplined.

ADVERTISEMENT

Prosecutors have been forced to review thousands of arrests linked to the officers, which has led to the dismissal of 13 criminal cases thus far, according to the San Francisco District Attorney’s Office.

“The fact that San Francisco is forced to retain police officers that demonstrated explicit racism will have ramifications for the reputation of the department,” District Attorney George Gascón said in a statement after the ruling.

The offensive texts came to light during an FBI corruption investigation involving Ian Furminger, a former San Francisco police sergeant.

ADVERTISEMENT

Court documents in the Furminger case said officers used their phones to text offensive messages. In the texts, Furminger used racial epithets, bragged that a relative was a slave auctioneer, and joked about the Ku Klux Klan. He also sent texts insulting Latinos and gay people, the documents said.

The San Francisco Chronicle newspaper reported that three officers resigned in connection with the probe, though one asked to be reinstated after Daugherty’s case was filed.

ADVERTISEMENT

(Reporting by Curtis Skinner in San Francisco; Editing by Brendan O’Brien and Ken Wills)