In Baton Rouge, La. a bystander with a cell phone pressed record as police officers tackled a black man, screamed that he had a gun, then moments later shot and killed him.

In Falcon Heights, Minn., a black woman turned on a Facebook live video as her black boyfriend lay bleeding in the driver's seat of their car. The police officer who shot him stood outside, gun still drawn.

The shootings stoked flare-ups this week in a movement against police tactics in the United States that activists say are racist and violent. The raw videos — as with previous cases that set off protests and even riots in North Charleston, S.C., New York City, and beyond — were essential to the stories and their viral flight across the Internet.

But in Florida, experts say, the people taking those videos may have been accused of breaking the law.

The recording of police falls into a legal gray area. When audio is involved, Florida law requires consent of the people being recorded wherever they have a reasonable expectation of privacy.

The state chapter of the American Civil Liberties Union firmly believes a police officer conducting public business in a public area cannot have such an expectation. But without a court ruling offering clear guidance, the organization says, investigators and judges decide on a case-by-case basis if recorders are invading officers' privacy.

"If you are told by a police officer to not record audio, you should comply," the ACLU of Florida advises on its website.

RELATED COVERAGE: Authorities say suspect in Dallas sniper killings wanted to kill 'white officers'

Police in Tampa Bay say officers should always assume they are being recorded, and that it is generally legal for people to do so.

"As long as it's not impeding in an investigation, they have a right to videotape in a public place," St. Petersburg police spokeswoman Yolanda Fernandez said.

Likewise, in Hernando County, "deputies may be videotaped by the public," said Denise Moloney, a sheriff's office spokeswoman. "It is not a problem."

The Pinellas Sheriff's Office's policy on videotaping advises deputies to "assume every camera or phone is recording their activities" and to "not order any person to stop observing, photographing or recording" unless it threatens someone's safety or interferes with law enforcement duties.

At issue is a Florida statute intended to guard against wiretapping. Nine states including Florida require both parties in a recorded conversation to consent to the recording, according to the Digital Media Law Project. The other states are California, Connecticut, Maryland, Massachusetts, Montana, New Hampshire, Pennsylvania and Washington.

But free speech advocates say that law was only meant to protect people from illegal bugging.

RELATED COVERAGE: Tampa Bay law enforcement grapples with shock, grief in wake of deadly Dallas ambush

"The purpose of the all-party consent statute on recording in Florida has nothing to do with filming police in public places," University of Florida media law professor Clay Calvert said.

A private phone conversation might be covered by the statute, he said, or a behind-closed-doors meeting.

Deputies or officers working on the street are in the public eye, said Howard Simon, the executive director of the Florida ACLU.

"It's not like a public official sitting eating a hot dog at a place having lunch," he said. "It's a public official who's conducting public business out in public."

Videos of police actions are valuable as an accountability measure, Simon said. In some incidents, they might exonerate officers. In others, they might expose wrongdoing.

"We wouldn't be having the conversation of policing, good policing in this country and the impact, the day-to-day impact of policing on the minority community, if there weren't a record of some of these things," Simon said.

The lines of when and where citizens should be able to record police, however, remain vague. In 2011, Pasco deputies accused two people of surreptitiously recording interviews with detectives after a shooting. They faced charges of interception and disclosure of oral communications, but prosecutors dropped both cases.

On the street, Pasco sheriff's spokesman Kevin Doll said, people can reasonably record a deputy.

"If it's just (deputies) doing their job, then we don't generally have a problem with that," he said.

Tampa police in 2014 had to pay more than $40,000 in a settlement to a woman who was arrested as she tried to film officers arresting her husband for driving under the influence. In a department legal bulletin that year, an attorney told officers not to "expect the courts to protect you from the annoyance of having your general activities recorded from an appropriate distance."

The U.S. Court of Appeals for the Eleventh Circuit, which covers Florida, ruled years ago that people have a First Amendment right to record police in public unless they infringe on an investigation. But Calvert said the U.S. Supreme Court will ultimately have to weigh in on the matter for a final say, and until then, people should listen if an officer tells them to stop recording and challenge the case later.

"The person has maybe two choices: If they don't want to become a test case, they can figure out how to turn off the audio," the ACLU's Simon said. "But if they're willing to stand up and assert their rights and become a test case, they can refuse to comply. And if there's any further action, contact the ACLU."

Times staff writer Richard Danielson contributed to this report. Contact Zachary T. Sampson at zsampson@tampabay.com or (727) 893-8804. Follow @ZackSampson.