A new law granting public access to police misconduct records and investigations of officers’ use of force applies to all records that existed when the law took effect this year no matter when they were created, a state appeals court has ruled in a decision with immediate statewide impact.

Police unions in numerous localities, including Contra Costa County and five of its cities in the current case, sued to block release of records created before 2019. The unions, which had opposed the disclosure law in the Legislature, contend the law was not drafted to apply to earlier records.

Superior Court judges around the state have generally disagreed with the unions. But in the first decision with broad impact, the First District Court of Appeal in San Francisco late Friday published an earlier two-page order in the Contra Costa case making all existing records available to the public.

While the police unions had argued that applying the law to pre-2019 records would make it impermissably retroactive, the court said it was applying the law to events that happened after it took effect — requests by members of the public for documents a police agency already possessed.

Making officers’ records public also doesn’t impose any new penalties or other legal consequences for the officers’ previous acts, the court said, but “changes only the public’s right to access peace officer records.”

By issuing the ruling, Presiding Justice Stuart Pollak and Justices Alison Tucher and Tracie Brown upheld a decision by Superior Court Judge Charles Treat. As the first published appellate decision on the issue, it is binding on trial courts statewide unless another appeals court publishes a contrary ruling or the state Supreme Court intervenes. Police groups in other counties have asked the state’s high court to take up their case, but the court has refused.

“For the first time in a long time, the Legislature has decided it’s really important for public trust in law enforcement and the administration of justice in this state for people to be able to obtain records of serious incidents of police misconduct,” Tenaya Rodewald, a lawyer arguing for release of the records, said Monday. The American Civil Liberties Union and the California First Amendment Coalition also participated, along with several news organizations. The Chronicle has filed public records requests under the new law.

Michael Rains, the police unions’ lawyer, said the ruling reflected courts that “I don’t think ... give one hoot about the rights of police officers,” including the right to keep their personnel records confidential. He said he would not appeal the Contra Costa case, since the records would already have been released, but the issue is still pending in appellate courts elsewhere in the state.

For decades, California has had some of the nation’s most stringent confidentiality standards for police personnel records. The new law, SB1421 by Sen. Nancy Skinner, D-Berkeley, allows members of the public to obtain records of police disciplinary agencies that found officers had committed sexual assault or engaged in dishonest conduct at work, and of all investigations of an officer’s use of a firearm or of some type of deadly force.

Records cannot be disclosed if they would identify a confidential witness or informant, endanger an officer or interfere with a criminal investigation.

Rodewald said police organizations around the state have filed about 18 lawsuits challenging disclosure of records created before 2019. She said many police agencies, including those covered by the Contra Costa ruling, have begun releasing their records. And in a separate ruling Friday, a judge ordered the San Francisco Police Department to make its records public.

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter: @BobEgelko