The authorities in California are advising people to avoid consumption of crabs contaminated by a natural toxin that has spread throughout the marine ecosystem off the West Coast, killing sea mammals and poisoning various other species.

Kathi A. Lefebvre, the lead research biologist at the Wildlife Algal Toxin Research and Response Network, said on Wednesday that her organization had examined about 250 animals stranded on the West Coast and had found domoic acid, a toxic chemical produced by a species of algae, in 36 animals of several species.

“We’re seeing much higher contamination in the marine food web this year in this huge geographic expanse than in the past,” Ms. Lefebvre said.

She said that the toxin had never before been found in animals stranded in Washington or Oregon, and that there were most likely greater numbers of contaminated marine mammals not being found by humans.