Superior Court Judge Victor Hwang was one of five judges to sign off on search warrants for the home and office of freelance journalist Bryan Carmody. (Ekevara Kitpowsong/2016 Special to S.F. Examiner)

A San Francisco judge signed off on a search warrant for police to raid the office of a freelance journalist despite being told that the stringer made a career out of “selling hot news stories,” newly released records show.

Freedom of the press attorneys released an unsealed warrant application Tuesday that police filed with San Francisco Superior Court Judge Victor Hwang to search the office of freelancer Bryan Carmody.

The application shows for the first time that at least one of the five judges who approved the legally troubled search warrants against Carmody had “ample facts” to know he worked as a journalist, according to David Snyder, executive director of the First Amendment Coalition.

Journalists are protected from having search warrants issued against them under the California Shield Law. The document refers to Carmody as a stringer who produced news stories for a living.

“All of these facts together should have raised a very serious red flag for the judge,” Snyder said.

Hwang is one of the four judges who have since decided that the searches should not have been approved during an investigation into a leaked police report on the death of Public Defender Jeff Adachi. A fifth judge is expected to make a decision next Friday.

“It is indisputable that Mr. Carmody is a journalist under the definition of California’s shield law and the shield law would protect Mr. Carmody,” Hwang said in his decision last Friday, according to the San Francisco Chronicle.

Snyder called the situation a “stunning failure by the judiciary to stop these raids.”

“This affidavit, much more than the ones we’ve seen, shows that there was just an across the board failure in San Francisco to protect the rights of Bryan Carmody and by extension all journalists,” Snyder said.

Snyder said the warrant application also shows that police targeted Carmody to learn the identity of the source who leaked him the Adachi report, which is specifically protected by the Shield Law.

“They made it crystal clear that’s what they were going for,” Snyder said.

Ben Berkowitz, an attorney for Carmody, said in a statement he was “gratified” the courts have decided to quash the search warrants so far.

“It’s now clear from the unsealed warrant applications that the SFPD knew Bryan was a journalist when they sought these illegal warrants,” Berkowitz said, referring to the San Francisco Police Department. “It should never be the case that law enforcement intentionally violates the protections of the First Amendment and California’s Shield Law to spy on a journalist.”