San Francisco District Attorney George Gascón condemned a recent police raid on a journalist’s home in the city, saying he “can’t imagine a situation in which a search warrant would be appropriate.”

The DA’s tweets came 10 days after San Francisco police raided a freelance video reporter’s home after he gave local television stations a copy of a police report into the sudden death of Public Defender Jeff Adachi earlier this year.

Police executed a warrant on the home and office of videographer Bryan Carmody, seizing his computers, cell phones and other devices, The San Francisco Chronicle reported. The raid came after police asked Carmody for his source on the police report on Adachi and he declined to provide it.

In the raid, officers beat on the outer gate of Carmody’s home with a sledgehammer, then handcuffed him once he opened it and entered his house to seize his items.

Gascón said his office had not seen the warrant, and that it would only be appropriate if a journalist had broken the law to get the information that was leaked. He compared the “confidences” that journalists owe to their sources to the concept of attorney-client privilege.

“Seizing the entire haystack to find the needle risks violating the confidences Mr. Carmody owes to all his sources, not just the person who leaked the police report,” Gascón tweeted.