At the bottom of shallow waters, the smooth sand trembles as a stingray flutters its fins, emerging. The predator uses specialized senses to scan for the faint electric pulses of potential food.

All life emits these weak electric fields, like ripples from a pebble dropped in water. An errant shrimp wriggles. Electricity surges. Receptors tingle.

Stingray dinner time.

This animal story is much the same as one that plays out in San Francisco streets as the San Francisco Police Department allegedly employs controversial new surveillance technology to pin down crooks.

The "StingRay" is a mobile cellphone tracker small enough to be put in a van and driven around to detect errant cellphone signals — ostensibly the signals of crooks. The ACLU claims that the SFPD has a StingRay device, and the organization is concerned police are swallowing up private citizens' data in the name of catching criminals.

But confirming the SFPD has a StingRay is not easy; the cops won't say, but there are many documents out there that indicate the SFPD has one — or at least is trying to get one.

Government grant documents show the SFPD asked for money to obtain a StingRay, which costs between $60,000 and $130,000 depending on the make and model, and was approved to buy it. In its own application for the device, the San Jose Police Department said point-blank that the SFPD has a StingRay.

Though the SFPD remains tight-lipped, it might be forced to reveal to the public if it has the device and how it's using it should new legislation pass through the Board of Supervisors.

Two weeks ago, Supervisor John Avalos told reporters at a press conference that he has plans to draft legislation requiring city agencies to develop best practice policies around surveillance technology.

The legislation will say that if you're part of San Francisco government and you're spying for whatever reason, you'd better have a tight legal framework to tell the public how, why, and when you're snooping, and who you're snooping on. Avalos' legislation isn't yet complete, but may also call for a public process to discuss the pros and cons of using surveillance technology in general.

Government spying is often seen through a federal lens. Surely it's the National Security Agency that we need to worry about, not the local cops, right? On the steps of City Hall in early November, American Civil Liberties Union experts put that idea to rest.

Data is being scooped up by local police, and it often finds its way into the hands of the feds anyway, Nicole Ozer, the technology policy director at ACLU NorCal, tells SF Weekly.

"Data," she says, "doesn't stay local."

The SFPD, and other city agencies, already employ a lot of surveillance. Shotspotters record gunshots in our neighborhoods, license plate scanners track our driving habits. Even Muni has cameras in our stations and on our buses. Soon, cameras in transit hubs may scan passengers' faces and analyze their body movements with behavioral analy-sis technologies, according to the San Francisco Municipal Transportation Agency, which is negotiating grants to purchase such technology.

The FBI will soak up all that data like a sponge, the ACLU claims.

But the most controversial of those surveillance technologies is what are called "cell-site catchers" or "International Mobile Subscriber Identity catchers," of which the StingRay is a popular brand, the Kleenex of domestic spying.

Catching information is its specialty, and therein lies the problem, critics say. It catches too much information.

When the StingRay is hooked into a police van, it begins its search for an alleged criminal's phone. But any cellphones sending signals to nearby towers are automatically rerouted through the device. So yes, the cops see your cat videos. Like a net trawling through the ocean, it captures everything: text messages, voice call history, emails, GPS data, and more.

Criminal or innocent, prey or passerby, the police now have information about you that you didn't want to give them.

For this reason, "StingRays are highly intrusive cellphone invasion technologies," says Linda Lye, staff attorney with the ACLU NorCal. The Fourth Amendment, she notes, protects against unreasonable search and seizure.

"We wouldn't tolerate it if the government went through every apartment in an apartment complex to find one potential criminal," Lye says. "That affects the 50 other people in the building. That's exactly what a StingRay does."

Sifting through the data of passersby, police eventually locate the alleged crook's cellphone via its unique numeric identifier. They can trace his or her GPS position inside an apartment to within 9 feet. Then the cops catch their prey.

News reports show nine police districts statewide may employ StingRay, from Sacramento and Oakland to Los Angeles. The ACLU also obtained records of arrests in Oakland using the device.

Journalists have long tried to figure out whether their own local police are using StingRays. In S.F.'s case, there are hints that the SFPD has the technology.

Records from the San Francisco Department of Emergency Management show in 2009 the SFPD applied for a grant to purchase StingRay equipment. They were awarded the money, though Emergency Management Spokesman Francis Zamora could not find additional documents to confirm the department actually followed through with spending it. (He attributed the lost documentation to a turnover in filing staff.)

The SFPD, for its part, isn't telling.

"It's certainly understandable as with any new technology there could be abuse, therefore we adopt policy, procedures, etc., with any new technology," SFPD spokesman Albie Esparza writes to SF Weekly.

"Our Chief supports transparency in the Department," he adds.

But, in the very next paragraph, he illustrates the limits of that philosophy: "As for StingRay, we are not able to discuss this. We are not able to confirm or deny the existence or use of StingRay technology."

Along with the ACLU, journalists nationwide are pressing the FBI for more information about StingRay use at the local level. In response to a request from tech site Ars Technica, FBI Supervisory Special Agent Chief Bradley Morrison penned a stern four-page note detailing the importance of StingRay to national security.

Morrison argued that if a single detail of StingRay was released about its presence, its use, even its very existence, terrorism surveillance nationally would be threatened. (It's worth noting that although the NSA says StingRay is a way to track terrorists in cities, local police agencies like Oakland say they use it mainly for drug busts.)

"Criminal defendants will gain valuable intelligence," he wrote. Particularly, "non-U.S. citizens" would benefit from news reports about the operation of the device.

Secrecy is so important, Morrison explained, that any unauthorized disclosure of StingRay is a felony punishable by up to 20 years imprisonment and up to $1 million per occurrence.

But buried amid the legalese was an admission that local police with StingRay technology are required to sign a nondisclosure agreement with the FBI.

Perhaps that explains the SFPD's caginess on the subject. But with Avalos' proposed legislation, an NDA might be at odds with the new ordinance requiring public process and disclosure.

That could mean local and federal agencies might find themselves in conflict. The City Attorney's Office wouldn't comment on this, but the ACLU's Lye believes the SFPD would be legally compelled to explain to the public if and how it uses StingRay.

The FBI then would have a choice: allow the SFPD to use the technology without the gag order, or be forced to take away the SFPD's surveillance toy.

The legal struggle may force the stingray to emerge from the sand, whether it wants to or not.