Bryan Carmody said 10 police officers were bashing the front gate of his home with a sledgehammer.

Bryan Carmody, a freelance reporter in San Francisco, awoke Friday to the sounds of someone trying to break into his house.

About 10 officers from the San Francisco Police Department were bashing the front gate of his Outer-Richmond home with a sledgehammer, he said. It was just after 8 o'clock in the morning.

Carmody called out and said he would let them into the house. The officers showed him a search warrant, and proceeded to go through his home - from "top to bottom" he says - with their guns drawn.

"They treated me like I was some kind of drug dealer," he said in an interview with The Washington Post.

Carmody was being raided in connection with a criminal investigation.

Two weeks before, police investigators showed up at his home to ask him, politely he says, to identify the source who provided him with a confidential police report about the February death of the city's public defender, Jeff Adachi. Carmody, who said he worked with three local television news stations on the story, declined.

He wasn't about to give up his source on Friday either, despite the escalation - not to the police, or two FBI agents in suits who questioned him about the case, he said.

"I'm smart enough not to talk to federal agents, ever," Carmody said. "I just kept saying, 'lawyer, lawyer, lawyer.' "

So he stayed handcuffed for the next six hours, he says - a certificate of release he distributed from the police department says he was in custody from 8:22 a.m. until 1:55 p.m. - as investigators searched his home, and then his office, where they found the report in a safe. A search warrant filed in the case notes that it was issued as police investigated "stolen or embezzled property."

"There's only two people on this planet who know who leaked this report - me and the guy who leaked it," Carmody said.

The raid on Carmody's home and office drew wide First Amendment-related attention in the Bay Area over the weekend. And it added a new twist to the intrigue that surrounded the death of Adachi, who had built up a high profile as a public defender in the 16 years he'd held the office.

The only elected public defender in California, Adachi was known as an watchdog on police misconduct. His death, on Feb. 22, at the age of 59, was attributed in early reports to a heart attack.

Then more information came to light.

On Feb. 24, ABC 7 published a story after it said it obtained a police report and photos about Adachi's death, which included unflattering details about Adachi's last hours. The story reported that he had been with a woman named Caterina - not his wife - and that he was found unresponsive in an apartment with "an unmade bed, empty bottles of alcohol, cannabis gummies, and two syringes that may have been left by paramedics."

The publication of those details, which did little to illuminate the nature of Adachi's death and more to call into question his character, prompted some to wonder if the police department was retaliating against Adachi, even after his death.

"It's curious that we're reading leaked details about another 'woman,' the renting of an apartment, and entirely unnecessary mentions of alcohol, cannabis, and syringes," SFist noted at the time. "Certainly the incident ought to be investigated, as any death should, but the information coming out makes it seem like Adachi's decades-old battles with law enforcement - on behalf of defendants and otherwise - may continue even after his passing."

Tim Redmond, the editor of the San Francisco news site 48 Hills, called the local coverage "repugnant," noting how disliked Adachi was by many police officers in the city in a post he wrote at the time.

"Where do you supposed those came from? Why do you suppose they wound up with the sensation-driven TV stations?" he wrote of the provenance of the police report. "The photos have been widely publicized with no context at all. There are photos of 'an unmade bed' - a salacious innuendo with no relevance."

Carmody declined to give specifics about the three outlets he had worked with on the story.

A "stringer" in the parlance of TV news, Carmody occupies the small niche in the world of broadcast journalism that was satirized in the Hollywood film "Nightcrawler."

He works every night from about 10 p.m. to 6 a.m., where he chases news, like car crashes, crime scenes, disasters, weather stories, the release of a new video game - "anything that happens overnight," he says - and then sells his services and materials he gathers to local stations for their morning broadcasts. His name is rarely included on the report or corresponding material, he said.

His company, North Bay Television, run out of an office stocked with police scanners, computers, and a coffee machine downtown, employs three or four other people, down from a one-time peak of 10.

"Like all media, we are shrinking," he said.

He said he has never paid any of his sources of information or material.

Asked about tensions between the police department and Adachi, Carmody declined to comment on the politics of the case.

"I had no beef with him, I had no beef with anyone, I'm just a journalist in the middle of this," he said.

He said he believed he was being targeted because he was a freelancer, noting that details in the police report had appeared in other publications, like the San Francisco Chronicle.

"I don't think there was a police raid at the Chronicle with a sledge hammer yesterday," he said.

A medical examiner's report, which was released to the media in March, filled in more details about Adachi's death. The office ruled his death an accident due to the effects of cocaine and alcohol combined with a preexisting heart condition it said Adachi had.

The San Francisco Police Department defended the investigation on Saturday in a statement sent to local reporters.

"The citizens and leaders of the City of San Francisco have demanded a complete and thorough investigation into this leak, and this action represents a step in the process of investigating a potential case of obstruction of justice along with the illegal distribution of confidential police material," it said.

FBI spokeswoman Katherine Zackel said that its agents did not participate in the execution of the search warrant but confirmed that they were present to interview Carmody.

A law enforcement source said that Carmody was handcuffed for procedural issues related to "multiple weapons" in the house. Carmody said that he is the lawful owner of an unspecific number of guns.

Carmody says his ability to work is now crippled by the seizure of his electronics. A search warrant and affidavit he distributed noted that police took at least at least four tablets, seven computers, 10 hard drives, a dozen phones, two cameras, reporters' notebooks, and a thumb drive from his home. He's started a GoFundMe to raise money to buy more equipment.

Thomas Burke, a First Amendment lawyer in the Bay Area who represents Carmody, said that he believes the police overreached significantly.

"The appropriate thing was to issue a subpoena, not a search warrant," he said, noting the breadth of Carmody's material they had control over in all of this devices and notebooks. He said he wants to know whether the judges who signed the warrants were aware that they were for a reporter's home and office.

Carmody said he had never been pressured by law enforcement to give up a source before in 29 years of reporting, mentioning, as an example the leaked photographs from San Francisco's public transportation agency he recently acquired that exposed a safety issue with some trains.

"I am shocked at how far this has gone already," he said. "It's already gotten way out of hand."