SAN FRANCISCO (KGO) -- Documents released Tuesday show the extreme measures San Francisco police took to find the I-Team's source for reports on the death of Public Defender Jeff Adachi.
First Amendment advocates say the SFPD broke state and federal law.
In the court document, an SFPD investigator lists I-Team reports -- tweet by tweet, story by story -- on the death of San Francisco Public Defender Jeff Adachi in February at a North Beach apartment.
They wanted to know how we obtained the police report that included photographs of the scene, and concluded, "Dan Noyes was offered the death investigation report by Bryan Carmody, who obtained the report from a San Francisco Police Officer."
Carmody is a freelance journalist who shoots video, gathers information, and sells it to various media outlets, including ABC7.
Based on that affidavit, the judge approved a warrant for Carmody's phone records, and later, another judge approved a raid on his home and office.
David Snyder, Executive Director of the First Amendment Coalition, tells the I-Team, "I think the police department has violated the California Constitution, I think they violated California law, I think they violated federal law in executing these search warrants. This is a huge deal."
The investigator did not tell the judge Carmody is a journalist, that he's had an SFPD press pass for 16 years.
RELATED: SFPD obtained warrant to launch secret surveillance against journalist in Adachi leak investigation
They listed him as "Freelance Videographer/Communications Manager, USO Bay Area" and wrote he "is not currently employed by any of the news organizations that obtained the death investigation report."
"I would say it's absolutely clear that the department should have known that Bryan Carmody is a journalist," says Snyder. "And I think it stretches credibility that they had no idea."
Police Chief Bill Scott declined our request for an interview Tuesday, but Dan Noyes questioned him at a news conference in May.
RELATED: I-Team questions police chief about raid on journalist's home, Jeff Adachi investigation
Dan Noyes: "How can you defend a raid on a journalist's home and office?"
Chief Bill Scott: "So, I'm not here to try to defend it, because there's a lot of information that we we really have to look at and reflect."
His staff now tells the I-Team the police department is reviewing protocols involving members of the news media, and the San Francisco Department of Police Accountability is investigating what happened.
At an appearance in San Francisco Tuesday, State Senator Scott Wiener said we must take steps to make sure this doesn't happen again. "The press is one of the cornerstones of our democracy," said Wiener. "And the last thing we need is police raids on journalists so that they can't even protect their sources."
The judge ordered six lines blacked out on the affidavit for someone she calls "a confidential informant"; it appears to be someone who identified Carmody as having that police report. But, under court order, all the information is not to be used in further legal action because the search warrant on a journalist was improper.
See the search warrant and affidavit here.
Take a look at for a look at more stories by Dan Noyes and the ABC7 News I-Team.