A judge on Thursday quashed a search warrant used by San Francisco police to search a journalist’s phone in what was part of a controversial investigation into the leak of a police report on the death of Public Defender Jeff Adachi.

San Francisco County Superior Court Judge Rochelle East issued the ruling in court Thursday afternoon, essentially barring investigators from using any evidence that was obtained with the order.

East’s search warrant was one of several warrants police used in an investigation into who leaked a police report to freelance journalist Bryan Carmody.

Thomas Burke, Carmody’s attorney, said East “made it clear that the warrant shouldn’t have been issued, and that (Carmody) does have a San Francisco press pass,” suggesting police didn’t inform her that Carmody was a journalist before she issued the warrant.

East said she will release the affidavit of probable cause for the warrant Tuesday and plans to only redact a small portion, according to Burke.

“We’ll know more then about what she was or wasn’t told,” Burke said.

A representative of the San Francisco Police Department declined to comment on the development and pointed to a May 24 statement by Chief Bill Scott.

Scott, who initially defended the searches, later said he was concerned by a “lack of due diligence by department investigators” in addressing Carmody’s status as a journalist when seeking search warrants. Scott said he reached out to outside agencies to take over the criminal investigation.

Burke, who filed the motion to quash the warrants, argued that police illegally seized computers and other property — and conducted phone surveillance — amid a “violent and breathtakingly overbroad” search of Carmody’s home. The raid came as part of an investigation into who leaked Carmody the police report on Adachi’s death. Adachi, a frequent police critic, collapsed in an apartment after having a meal with a friend.

Local television news stations started reporting on the leaked police report on Feb. 23, the day after Adachi died. Some city officials believed a member of the department leaked the report to smear Adachi, who was a vocal opponent of police misconduct. The report noted that Adachi had been with a woman who was not his wife when he died.

Burke said police and judges violated state and federal laws, including Carmody’s right to due process and California’s shield law, which protects journalists from being compelled to identify sources. Free-press advocates, including the First Amendment Coalition, the Reporters Committee for Freedom of the Press and the Society of Professional Journalists, have condemned the raid.

Carmody’s press pass was issued by the San Francisco Police Department.

Three more hearings on the other warrants are scheduled for the next few weeks, regarding one other warrant for cell phone surveillance and the searches on his home and office. A fifth hearing on another cell phone warrant has not yet been scheduled. All five warrants were issued by different judges.

Burke said East’s ruling could signal that other judges will rule the same way. He added that if one judge wasn’t informed that Carmody was a journalist, “I suspect they weren’t told on the others either.”

Police used a sledgehammer on May 10 to raid Carmody’s home and office, seizing Carmody’s computers, phones and other electronic devices after learning he had sold the Adachi report to three television news stations.

Documents released weeks later revealed that the department had also obtained a warrant for Carmody’s phone records to “conduct remote monitoring” months before the raid.

Megan Cassidy is a San Francisco Chronicle staff writer. Email: megan.cassidy@sfchronicle.com Twitter: @meganrcassidy