A San Francisco-based freelance journalist will be getting back property seized this month by sledgehammer-wielding police who raided his home and office to investigate the source of a leaked police report.

Police agreed with a San Francisco County Superior Court judge Tuesday to return Bryan Carmody’s property, but the case will soon go back to court as his attorney and media organizations fight to unseal the warrants used for the May 10 raids.

Authorities confiscated several computers, cameras and computers. Police have defended the raids, saying they were "conducted as part of a criminal investigation into the illegal release of" a preliminary report into the death of former public defender Jeff Adachi.

The raids were authorized through search warrants signed by two judges.

Carmody’s arrest and the seizure of his property alarmed journalism advocates, who criticized the actions of police as violative of California’s shield law, which protects journalists from search warrants.

CRITICS BLAST 'P IS FOR PALESTINE' CHILDREN'S BOOK AS ANTI-SEMITIC; LIBRARY POSTPONES AUTHOR EVENT

Carmody said in court documents that he is a veteran journalist who covers breaking news and sells video to news outlets.

While covering Adachi’s Feb. 22 death, a source gave him a preliminary police report, which he sold along with news footage and interviews to three news stations. Some city leaders accused police of leaking the report to smear Adachi, who was an outspoken critic of the department.

Investigators said a police department employee may have had contact with Carmody. "We believe that that contact and that interaction went across the line. It went past just doing your job as a journalist," Chief William Scott said. "This is a big deal to us, as well it should be. It's a big deal to the public. It's a big deal to you all."

Still, Scott insisted, "We respect the news media."

HIGH SCHOOL NEWSPAPER PUBLISHING A PROFILE OF AN 18-YEAR-OLD STUDENT WHO WORKS IN THE PORN INDUSTRY

An autopsy concluded that Adachi died from a mixture of cocaine and alcohol.

Mayor London Breed initially defended the police actions, but said she “was not okay with police raids on reporters” in a Sunday tweet.

District Attorney George Gascon told The Associated Press he could not imagine a scenario where warrants targeting a journalist would be appropriate. His office has not seen the warrants.

Carmody said he will have to replace a big chunk of the equipment taken by the police for security reasons. As of Tuesday evening, a GoFundMe created to help with equipment costs raised nearly $15,000.

CLICK HERE TO GET THE FOX NEWS APP

Jim Wheaton, founder of the public interest law firm the First Amendment Project, said Carmody was an easy target for police, given his freelance status.

"They went after him because he's all by himself," Wheaton said, "and the fact that he sells the materials that he packages. He puts together a journalism report including documents and sells it. That's what journalism is."

The Associated Press contributed to this report.