The union representing San Francisco police officers is calling for its chief to resign over his handling of the police raid of a freelance journalist's home and office.

Chief William Scott acknowledged Friday that the searches were probably illegal and apologized for the way his department handled the investigation into who leaked a confidential police report to Bryan Carmody.

California's shield law protects journalists from search warrants, and Scott said the paperwork seeking court approval of the raid didn't adequately identify Carmody as a journalist. He blamed department investigators for their "lack of due diligence."

FILE - In this May 10, 2019, image taken from video provided by Bryan Carmody, San Francisco police armed with sledgehammers execute a search warrant at journalist Carmody's home in San Francisco. San Francisco's police chief is apologizing for raiding the freelance journalist's home and office to find out who leaked a police report into the unexpected death of the city's former public defender. Chief William Scott told the San Francisco Chronicle on Friday, May 24, 2019, the searches were probably illegal and said, "I'm sorry that this happened." (Bryan Carmody@bryanccarmody via AP, File)

FILE - In this May 10, 2019, image taken from video provided by Bryan Carmody, San Francisco police armed with sledgehammers execute a search warrant at journalist Carmody's home in San Francisco. San Francisco's police chief is apologizing for raiding the freelance journalist's home and office to find out who leaked a police report into the unexpected death of the city's former public defender. Chief William Scott told the San Francisco Chronicle on Friday, May 24, 2019, the searches were probably illegal and said, "I'm sorry that this happened." (Bryan Carmody@bryanccarmody via AP, File)

The police union fired back on Saturday, saying Scott ordered the investigation, knew Carmody was a journalist and deceived the sergeant who wrote the search warrant.

Scott has not returned a request for comment.

FILE - In this May 21, 2019, file photo, San Francisco Police Chief William Scott answers questions during a news conference in San Francisco. Scott is apologizing for raiding a freelance journalist's home and office to find out who leaked a police report into the unexpected death of the city's former public defender. Scott told the San Francisco Chronicle on Friday, May 24, 2019, the searches were probably illegal and said, "I'm sorry that this happened." (AP PhotoEric Risberg, File)

FILE - In this May 21, 2019, file photo, San Francisco Police Chief William Scott answers questions during a news conference in San Francisco. Scott is apologizing for raiding a freelance journalist's home and office to find out who leaked a police report into the unexpected death of the city's former public defender. Scott told the San Francisco Chronicle on Friday, May 24, 2019, the searches were probably illegal and said, "I'm sorry that this happened." (AP PhotoEric Risberg, File)