Florida Gov. Rick Scott signed the measure Thursday, saying it will protect the state's residents from "unwarranted surveillance."

Before local or state law enforcement agencies can use surveillance drones, the Freedom from Unwarranted Surveillance Act requires a judge to approve in nearly all cases.

The legislation makes exceptions in cases involving "imminent danger to life or serious damage to property" and when "credible intelligence" from the federal Department of Homeland Security points to "a high risk of a terrorist attack."

The bill that state lawmakers passed unanimously earlier this year, Scott said, "maintains a balance between the need for law enforcement to protect our citizens against credible threats and imminent danger while ensuring that the privacy of Florida families is protected."

The measure was backed by both the American Civil Liberties Union and by conservative Republicans.

In Florida, the Miami-Dade Police Department and the Orange County Sheriff's Office each have two drones. Miami-Dade's roughly backpack-size Honeywell T-Hawks have been used only in training exercises so far, Detective Roy Rutland said earlier this year.

To some, the idea of an unmanned aircraft hovering over U.S. homes seems like a scenario out of a science fiction novel.

But the use of drones has become controversial in recent years as unmanned aerial vehicles have become cheaper and more advanced. The concerns range from moral questions over their use in warfare overseas to worries about their impact on air traffic in the United States.

Other states are also weighing measures to restrict domestic drone use, the ACLU said.

Senate Judiciary Committee Chairman Patrick Leahy, D-Vermont, held and studied a small plane weighing just 2 pounds before beginning the hearing.

"I am convinced that the domestic use of drones to conduct surveillance and collect other information will have a broad and significant impact on the everyday lives of millions of Americans," he said.

The small aircraft can be fitted with lightweight cameras. And Sen. Charles Grassley of Iowa, the ranking Republican on the panel, said the technology may require lawmakers to develop a new definition of an unreasonable search, which is banned under the Constitution's Fourth Amendment.

"The thought of government drones buzzing overhead monitoring the activities of law-abiding citizens," he said, "runs contrary to the notion of what it means to live in a free society."