On Tuesday, a Superior Court judge granted a request by eight police unions to block their respective departments from releasing misconduct records.

It’s the latest in a series of legal challenges by unions throughout California seeking to limit the scope of SB 1421, landmark legislation that gives the public access to records of police shootings and substantiated allegations of sexual assault or lying by on-duty officers.

Like other suits brought by police unions, the San Diego case, brought by the unions representing the San Diego, Carlsbad, Coronado, El Cajon, National City, Oceanside, San Diego Unified (San Diego Schools Police Officers Association) and Harbor Police departments, focuses on whether SB 1421 covers misconduct that occurred prior to the law taking effect on Jan. 1.

“Retroactivity is the issue,” said David Leonhardi, president of the Deputy Sheriffs’ Association of San Diego, which opted not to join the lawsuit. “We’ve been around since 1850, so the question is, does the law apply to 1850 and beyond?”

The stay is temporary, pending another hearing on March 1. Judge Eddie Sturgeon put the case on a short timeline, describing it as a “very serious matter” regarding the public’s right to know.

Prior to SB 1421, California law barred the release of police disciplinary records without a court order. Numerous attempts over the last dozen years to amend the law failed.

SB 1421 was introduced nearly one year ago by Oakland Sen. Nancy Skinner, a Democrat, and got its first hearing not long after the death of Stephon Clark, the unarmed 22-year-old black man who was shot seven times by two Sacramento police officers in his grandmother’s backyard. The bill, which lays out narrow circumstances in which records can be made public, including “an incident in which the use of force by a peace officer or custodial officer against a person resulted in death, or in great bodily injury,” was signed into law in September as part of a larger effort by Democratic legislators to bring more transparency to policing, particularly when it concerns racial profiling and use of force.

“SB 1421 will help us hold accountable the few bad actors and build greater community trust in law enforcement,” Skinner said in a statement introducing the bill.

But even before the law took effect, police unions mounted a challenge. In December, the San Bernardino County Sheriff’s Employee Benefit Association asked the state Supreme Court to clarify whether SB 1421 applied retroactively. The court declined to hear the case, resulting in numerous lawsuits filed at the county level. So far, all the retroactivity challenges brought by police unions have resulted in stays.

Bardis Vakili, a senior staff attorney with the ACLU of San Diego and Imperial Counties, said the bill covers all records currently in a law enforcement agency’s possession, regardless of when they were created.

“It’s not a bill that calls retroactivity into question, at all,” he said.

On Tuesday, the ACLU, San Diego Union Tribune and 10 News told Sturgeon they plan to intervene in the case.

Rick Pinckard, the attorney representing the San Diego police unions, said that while this lawsuit challenges only the law’s retroactive application, the unions haven’t ruled out a challenge to the law itself. He said the public should trust police departments to effectively weed out bad cops.

“When police officers do bad things, they are disciplined,” he said.

But that’s not always the case.

A 2015 Justice Department review of the San Diego Police Department found that officers weren’t being held accountable for bad behavior and SDPD’s internal system for dealing with misconduct was seriously flawed. The review stemmed from the arrest and prosecution of Anthony Arevalos, the San Diego police officer who was found guilty in 2011 of soliciting sexual bribes from multiple women. Court records showed the department long knew Arevelos was a problem but failed to discipline him.

A deposition in a civil case revealed that San Diego Police Officer Neal Browder faced no discipline — and was never even interviewed by the DA or internal affairs — after shooting an unnarmed mentally ill man, Fridoon Rawshan Nehad, in 2015.

Not every police union in California is seeking to block the release of records. Oakland TV station KTVU is tracking how departments are responding to the law and several have released records. Last week, the Union-Tribune obtained records from the Harbor and Chula Vista police departments pertaining to an officer-involved shooting and disciplinary actions against an officer caught having sex in public.

Vakili said the goal of legislation like SB 1421 is to build public trust through transparency.

Pinckard, a former cop, disagrees. He said the law will cause officers to second-guess their decisions. “I believe SB 1421 is about publicly shaming law enforcement officers and creating a disincentive to be proactive in their policing.”