San Francisco, New York, Washington and other big cities are using bluegills - also known as sunfish or bream - as a sort of canary in a coal mine to safeguard their water.
Small numbers of the fish are kept in tanks constantly replenished with water from the municipal supply.
Sensors in each tank work around the clock to register changes in the breathing, heartbeat and swimming patterns of the bluegills that occur in the presence of toxins.
The Intelligent Aquatic BioMonitoring System, as its known, was originally developed for the army and starts at around $45,000.
"Nature's given us pretty much the most powerful and reliable early warning centre out there," said Bill Lawler, co-founder of Intelligent Automation Corporation, a Southern California company that makes and sells the bluegill monitoring system.
"There's no known manmade sensor that can do the same job as the bluegill."
Since the September 11 attacks the US government has taken very seriously the threat of attacks on its water supply.
Federal law requires that nearly all community water systems assess their vulnerability to terrorism.
"It gives us the best of both worlds, which is basically all the benefits that come from nature and the best of high-tech"
Susan Leal, general manager of San Francisco Public Utilities Commission
Big cities employ a range of safeguards against chemical and biological agents, constantly monitoring, testing and treating the water. But electronic protection systems can trace only the toxins they are programmed to detect, Lawler said.
Bluegills - a species about the size of a human hand - are considered more versatile.
They are highly attuned to chemical disturbances in their environment and, when exposed to toxins, they experience the fish version of coughing, flexing their gills to expel unwanted particles.
The computerised system in use in San Francisco and elsewhere is designed to detect even slight changes in the bluegills' vital signs and send an email alert when something is wrong.
San Francisco's bluegills went to work about a month ago, guarding the drinking water of more than one million people from substances such as cyanide, diesel fuel, mercury and pesticides.
Eight bluegills swim in a tank deep in the basement of a water treatment plant south of the city.
"It gave us the best of both worlds, which is basically all the benefits that come from nature and the best of high-tech," said Susan Leal, general manager of the San Francisco Public Utilities Commission.
New York City has also been testing its system since 2002 and is seeking to expand it.
The New York City Department of Environmental Protection has reported at least one instance in which the system caught a toxin before it made it into the water supply. The fish noticed a diesel spill two hours earlier than any of the agency's other detection devices.
The fish do have limitations. While the bluegills have successfully detected at least 30 toxic chemicals, they cannot reliably detect germs.
They are also no use against other sorts of attacks - say, the bombing of a water main, or an attack by computer hackers on the systems that control the flow of water.
Still, Lawler said that several other cities have ordered the anti-terror apparatus, while San Francisco plans to install two more bluegill tanks.