A sea lion scratches himself on Pier 39 at Fisherman's Wharf in San Francisco

A toxin in algae may be erasing the memory of sea lions, which wash ashore by the hundreds each year off the coast of California, disoriented and suffering seizures, scientists said Monday.

Known as domoic acid, the substance is produced naturally by marine algae, but can harm sea lions' ability to navigate the waters and remember where to find food, said the findings in the journal Science.

Domoic acid builds up in shellfish, anchovies, sardines and other small fish that feed on algae filtered from the water. When sea lions eat these fish, they can become infected with high levels of the toxin.

The study -- by scientists at the University of California Santa Cruz, UC Davis and the Marine Mammal Center in Sausalito, California -- relied on brain scans and behavioral tests of California sea lions.

"This is the first evidence of changes to brain networks in exposed sea lions, and suggests that these animals may be suffering a broad disruption of memory, not just spatial memory deficits," said Peter Cook, then a graduate student at UC Santa Cruz and now at Emory University.

It is unclear if the toxin is the cause of what marine authorities have described as an "unusual mortality event," in which thousands of sea lions have washed up on the shores of California -- 10 times as many in the first five months of this year compared to the same five month period from 2004 to 2012 -- according to the National Oceanic and Atmospheric Administration (NOAA).

Toxic algae blooms commonly occur in the spring and fall off California, but have been getting worse and more frequent in recent years.

Cook and colleagues studied 30 California sea lions undergoing veterinary care and rehabilitation at the Marine Mammal Center.

The animals had magnetic resonance imaging (MRI) scans to measure their brain lesions, and were given behavioral tests, much like the kind given to rats in a maze where they must remember which way to go to get a food reward.

Sea lions with domoic acid poisoning often had damage to the hippocampus, where memory is processed.

The worse the damage, the less likely the animals were to survive.

"Sea lions are dynamically foraging -- and for an animal like that, if you don't know where you are, you have a big problem," said co-author Charan Ranganath of UC Davis.

Researchers say more work is needed to understand how much of the toxin causes brain damage over time.

The study appears in the December 18 edition of the journal Science, but was released early to coincide with a related talk at the Conference on the Biology of Marine Mammals in San Francisco.