The city of Los Angeles and police suffered a setback in court Tuesday when a judge declined to issue a restraining order relating to the released photos and data of thousands of LAPD officers.

Los Angeles County Superior Court Judge Mitchell Beckloff rejected the city’s request for a temporary restraining order to prevent the information and images to be used by an online database called “Watch the Watchers,” a project of the Stop LAPD Spying Coalition, the Los Angeles times reported.

Earlier this month, the city sued the Stop LAPD Spying Coalition and Ben Camacho, a reporter from Knock LA who received the contested data for about 9,000 officers from the city when he filed a public records request and then turned it over to the coalition.

Susan Seager, an attorney representing Camacho and head of UC Irvine School of Law’s Press Freedom Project, defended the database when speaking with reporters last week.

“This is a tool for the public to be able to identify an officer when the officer is doing something in public. The city voluntarily gave Mr. Camacho these photographs, these names, back in September, so you cannot punish the press for publishing things that they lawfully obtained,” she said.

The city and LAPD are facing legal challenges of their own, as the photos and data included officers who work undercover.

More than 300 undercover officers filed a lawsuit against the LAPD and city, arguing that the disclosure put them in danger.

It’s the ability to expose undercover operations that is most concerning, argued Matthew McNicholas, an attorney for the undercover officers.

“If you’re a drug operation, you can just say, ‘stand there, because you want to sell us drugs,’ and they take a picture of you right there. ‘Stand right there’ and they run it through [the database], and if you come back as a cop, we’ll put a bullet in your head,” McNicholas said.

McNicholas is seeking money from the city, which he said needs to pay for security for the exposed officers and their families.