The city of Los Angeles is suing a journalist and a watchdog group over the publication of Los Angeles Police Department officers’ names, photos and other information in a searchable online database.

The lawsuit comes just days after the city was itself sued by the police officers’ union the Los Angeles Police Protective League, which objects to the Watch the Watchers database, claiming it endangers officers.

Attorney Matthew McNicholas, representing more than 300 officers in their lawsuit against the city, said Tuesday that “this presents a significant threat to the safety of the citizens of Los Angeles.”

The information for the database came from a public records request filed by Ben Camacho, a reporter for the nonprofit outlet Knock LA, who then provided it to the Stop LAPD Spying Coalition, creators of the database.

The city filed suit against Camacho and the coalition, demanding that the information and photos be returned to the city and any copies destroyed.

The coalition’s Hamid Khan argued in response that safety is not the issue. Rather, he said, it’s a matter of what the public is entitled to know about taxpayer-funded agencies and their employees.

“This goes back to the very essence of what information should be available to the community members about public employees,” he said.

Knock LA described the lawsuit as an “irresponsible, ignorant action by Los Angeles city attorney, Hydee Feldstein Soto.”

“Feldstein Soto’s actions are a clear intimidation tactic fueled by the Los Angeles Police Protective League (LAPPL),” the outlet added. “Feldstein Soto and the LAPPL fail to recognize the function of the California Public Records Act (CPRA): this law grants the public access to internal documents, videos, photos, and other media possessed by public agencies. Camacho requested photos of Los Angeles Police Department officers under this law and the city itself granted the request.”

City leaders, however, have been unswayed. Mayor Karen Bass and LAPD Chief Michel Moore called the release of the information unacceptable.

“We erred in the sense that there’s photographs that are in there that should not have been in there,” Moore told the Los Angeles Times. “Now … that ship has sailed.”

At a Thursday morning press conference about potholes, Bass declined to comment on the lawsuit, though she reiterated her concerns about the potential risk to officers who work or have worked undercover.

Erin Myers contributed to this story.