Even a “known drug dealer” is legally allowed to photograph undercover cops as they serve a search warrant, if he takes the photos from a public space, according to a Florida prosecutor.

The photographer was 20-year-old Randy Sievert of Bradenton, who was arrested in February after he stood on a public road and photographed Manatee County sheriff’s officials conducting a search warrant on a private home.

Deputies ordered him to erase the images before they arrested him, charging him with interfering in a search warrant.

He was jailed without bail because the charge violated his probation in two drug cases. Although he is unemployed, he had $1,500 in cash in his pockets.

But Tony Casorias, an assistant state attorney, refused to prosecute Sievert, according to the Herald-Tribune of Sarasota

A person cannot be charged with obstruction or resisting arrest if the police detention is unlawful, an assistant state attorney, Tony Casoria, said in a memo released this week. Sievert did not physically interfere with the search warrant, the prosecutor said.

Casoria said Sievert “took a photograph in a public place, across the street from the home where law enforcement were conducting their search.”

Casorias, who was admitted to the Florida Bar in 2006, pointed to a decision in a federal lawsuit in which a judge awarded a man damages for his arrest for videotaping police, the article states.

In 2003, a state judge in Pennsylvania overturned the harassment conviction of Allen E. Robinson, who had taped police during a traffic stop. Robinson said he was concerned about unsafe truck inspections and set up a video camera.

Robinson, a truck driver, sued the police, saying he was subjected to false arrest, excessive force and malicious prosecution. Robinson won in federal court in 2005.

“The activities of the police, like those of other public officials, are subject to public scrutiny,” a federal judge wrote. “Robinson’s right to free speech encompasses the right to receive information and ideas.”

The police, the judge wrote, citing a case in Texas, do not have “unfettered discretion to arrest individuals for words or conduct that annoy or offend them.”