TALLAHASSEE — When a Florida sheriff sternly accuses state legislators of protecting drug dealers and child pornographers, it has a way of getting people's attention.

Pinellas County Sheriff Bob Gualtieri made that assertion in fighting a bill filed by Sen. Jeff Brandes, R-St. Petersburg, dealing with police access to information stored on citizens' portable electronic devices such as cellphones and iPads.

The controversy, also raging in other states, involves personal privacy, public safety and changing technology at a time when a related case is pending before the Florida Supreme Court.

Brandes, citing the importance of a constitutional right to privacy, wants to change state law to require police to obtain a warrant from a judge before searching cell phone contents. His bill would remove the current exception that allows warrantless searches of devices in what's known as a search incident to arrest, where an arrested person could hide or destroy relevant evidence.

The first-term senator, who has the support of public defenders, says a cellphone is the modern equivalent of the "papers and effects" that the Founding Fathers included in the Fourth Amendment to the Constitution as safe from unreasonable search and seizure.

"The Fourth Amendment to the Constitution is very clear: We are protected and the government needs to get a warrant to search your papers and effects," Brandes said. "To me, a cellphone, an iPad, those are the modern equivalents of papers and effects."

Gualtieri, backed by sheriffs, prosecutors and Attorney General Pam Bondi, says the change would make it harder for police to investigate crimes, and in the time it takes to get a warrant, a suspect could delete the evidence.

"This is a bill that really protects people engaged in child pornography, drug dealing and murders," Gualtieri said in testimony before a House committee. "We can't collect the evidence we really need to prosecute these cases."

Brandes' bill, SB 864, passed one Senate committee on a 5-2 vote and is one of dozens of bills currently awaiting hearings in the Senate Judiciary Committee, chaired by Sen. Tom Lee, R-Brandon. The House version, HB 797, sponsored by Rep. Carlos Trujillo, R-Miami, has cleared two House panels and is pending action in the House Judiciary Committee.

Even if the bill passes both houses, its future may be uncertain: Republican Gov. Rick Scott has not taken a position on the bill, but he has consistently sided with law enforcement on criminal justice issues, and Gualtieri this week urged Scott's chief of staff and general counsel to oppose the bill.

The sheriff cites the case of a man arrested in Gulfport for driving with a suspended license who had a 14-year-old runaway girl in his car. Police took the girl into custody, and a check of the man's cellphone revealed pictures of them having sex — a felony because the girl was under age.

"Now you've got a pedophile," Gualtieri said.

Brandes said the arresting officer had no right to confiscate the man's cell phone. "Why in the world would a police officer need to search your cellphone if you're driving on a suspended license?" Brandes said.

The legislation has created some odd political alliances. Brandes' position is backed by both the American Civil Liberties Union of Florida and the libertarian Cato Institute.

"Thank God there are principled conservatives in Tallahassee," said the ACLU's Howard Simon, frequently a harsh critic of Florida's Republican-controlled Legislature.

"We think it's another check on the power of the police, and it simply means that they first have to persuade a judge that there's a basis for a search," said Tim Lynch, director of Cato's criminal justice unit. "Without this rule, it leaves the privacy of people in the hands of a patrolman."

Opponents include conservative Republicans such as Sen. Rob Bradley of Fleming Island and liberal Democrats such as Rep. Irv Slosberg of Boca Raton, both of whom have cast no votes in committees.

"The bottom line is, this makes it more difficult to catch criminals," Slosberg said.

Steve Bousquet can be reached at bousquet@tampabay.com.