BARCELONA, Spain: Blue patrol boats crisscross the swimming areas of beaches here with their huge nets skimming the water's surface. The yellow flags that urge caution and the red flags that prohibit swimming because of risky currents are sometimes topped now with blue ones warning of a new danger: swarms of jellyfish.
In a period of hours during a day a couple of weeks ago, 300 people on Barcelona's bustling beaches were treated for stings, and 11 were taken to hospitals.
From Spain to New York, to Australia, Japan and Hawaii, jellyfish are becoming more numerous and more widespread, and they are showing up in places where they have rarely been seen before, scientists say. The faceless marauders are stinging children blithely bathing on summer vacations, forcing beaches to close and clogging fishing nets.
But while jellyfish invasions are a nuisance to tourists and a hardship to fishermen, for scientists they are a source of more profound alarm, a signal of the declining health of the world's oceans.
"These jellyfish near shore are a message the sea is sending us saying, 'Look how badly you are treating me,' " said Dr. Josep-María Gili, a leading jellyfish expert, who has studied them at the Institute of Marine Sciences of the Spanish National Research Council in Barcelona for more than 20 years.
The explosion of jellyfish populations, scientists say, reflects a combination of severe overfishing of natural predators, like tuna, sharks and swordfish; rising sea temperatures caused in part by global warming; and pollution that has depleted oxygen levels in coastal shallows.
These problems are pronounced in the Mediterranean, a sea bounded by more than a dozen countries that rely on it for business and pleasure. Left unchecked in the Mediterranean and elsewhere, these problems could make the swarms of jellyfish menacing coastlines a grim vision of seas to come.
"The problem on the beach is a social problem," said Dr. Gili, who talks with admiration of the "beauty" of the globular jellyfish. "We need to take care of it for our tourism industry. But the big problem is not on the beach. It's what's happening in the seas."
Jellyfish, relatives of the sea anemone and coral that for the most part are relatively harmless, in fact are the cockroaches of the open waters, the ultimate maritime survivors who thrive in damaged environments, and that is what they are doing.
Within the past year, there have been beach closings because of jellyfish swarms on the Côte d'Azur in France, the Great Barrier Reef of Australia, and at Waikiki and Virginia Beach in the United States.
In Australia, more than 30,000 people were treated for stings last year, double the number in 2005. The rare but deadly Irukandji jellyfish is expanding its range in Australia's warming waters, marine scientists say.
While no good global database exists on jellyfish populations, the increasing reports from around the world have convinced scientists that the trend is real, serious and climate-related, although they caution that jellyfish populations in any one place undergo year-to-year variation.
"Human-caused stresses, including global warming and overfishing, are encouraging jellyfish surpluses in many tourist destinations and productive fisheries," according to the National Science Foundation, which is issuing a report on the phenomenon this fall and lists as problem areas Australia, the Gulf of Mexico, Hawaii, the Black Sea, Namibia, Britain, the Mediterranean, the Sea of Japan and the Yangtze estuary.
In Barcelona, one of Spain's most vibrant tourist destinations, city officials and the Catalan Water Agency have started fighting back, trying desperately to ensure that it is safe for swimmers to go back in the water.
Each morning, with the help of Dr. Gili's team, boats monitor offshore jellyfish swarms, winds and currents to see if beaches are threatened and if closings are needed. They also check if jellyfish collection in the waters near the beaches is needed. Nearly 100 boats stand ready to help in an emergency, said Xavier Duran of the water agency. The constant squeal of Dr. Gili's cellphone reflected his de facto role as Spain's jellyfish control and command center. Calls came from all over.
Officials in Santander and the Basque country were concerned about frequent sightings this year on the Atlantic coast of the Portuguese man-of-war, a sometimes lethal warm-water species not previously seen regularly in those regions.
Farther south, a fishing boat from the Murcia region called to report an off-shore swarm of Pelagia noctiluca — an iridescent purplish jellyfish that issues a nasty sting — more than a mile long. A chef, presumably trying to find some advantage in the declining oceans, wanted to know if the local species were safe to eat if cooked. Much is unknown about the jellyfish, and Dr. Gili was unsure.
In previous decades there were jellyfish problems for only a couple of days every few years; now the threat of jellyfish is a daily headache for local officials and is featured on the evening news. "In the past few years the dynamic has changed completely — the temperature is a little warmer," Dr. Gili said.
Though the stuff of horror B- movies, jellyfish are hardly aggressors. They float haplessly with the currents. They discharge their venom automatically when they bump into something warm — a human body, for example — from poison-containing stingers on mantles, arms or long, threadlike tendrils, which can grow to be yards long.
Some, like the Portuguese man-of-war or the giant box jellyfish, can be deadly on contact. Pelagia noctiluca, common in the Mediterranean, delivers a painful sting producing a wound that lasts weeks, months or years, depending on the person and the amount of contact.
In the Mediterranean, overfishing of both large and small fish has left jellyfish with little competition for plankton, their food, and fewer predators. Unlike in Asia, where some jellyfish are eaten by people, here they have no economic or epicurean value.
The warmer seas and drier climate caused by global warming work to the jellyfish's advantage, since nearly all jellyfish breed better and faster in warmer waters, according to Dr. Jennifer Purcell, a jellyfish expert at the Shannon Point Marine Center of Western Washington University.
Global warming has also reduced rainfall in temperate zones, researchers say, allowing the jellyfish to better approach the beaches. Rain runoff from land would normally slightly decrease the salinity of coastal waters, "creating a natural barrier that keeps the jellies from the coast," Dr. Gili said.
Then there is pollution, which reduces oxygen levels and visibility in coastal waters. While other fish die in or avoid waters with low oxygen levels, many jellyfish can thrive in them. And while most fish have to see to catch their food, jellyfish, which filter food passively from the water, can dine in total darkness, according to Dr. Purcell's research.
Residents in Barcelona have forged a prickly coexistence with their new neighbors.
Last month, Mirela Gómez, 8, ran out of the water crying with her first jellyfish sting, clutching a leg that had suddenly become painful and itchy. Her grandparents rushed her to a nearby Red Cross stand. "I'm a little afraid to go back in the water," she said, displaying a row of angry red welts on her shin.
Francisco Antonio Padrós, a 77-year-old fisherman, swore mightily as he unloaded his catch one morning last weekend, pulling off dozens of jellyfish clinging to his nets and tossing them onto a dock. Removing a few shrimp, he said his nets were often "filled with more jellyfish than fish."
By the end of the exercise his calloused hands were bright red and swollen to twice their normal size. "Right now I can't tell if I have hands or not — they hurt, they're numb, they itch," he said.
Dr. Santiago Nogué, head of the toxicology unit at the largest hospital here, said that although 90 percent of stings healed in a week or two, many people's still hurt and itched for months. He said he was now seeing 20 patients a year whose symptoms did not respond to any treatment at all, sometimes requiring surgery to remove the affected area.
The sea, however, has long been central to life in Barcelona, and that is unlikely to change. Recently when the beaches were closed, children on a breakwater collected jellyfish in a bucket. The next day, Antonio López, a diver, emerged from the water. "There are more every year — we saw hundreds offshore Tuesday," he said. "You just have to learn how to handle the stings."