A ghoulish mystery is playing out along the shores of San Francisco Bay, where at least 80 leopard sharks — docile spotted animals that don’t eat people — have washed up dead in recent weeks.

Scientists suspect the sharks are being killed by a fatal brain infection linked to a fungus that may have been spread around by the huge amounts of rain California received this year. The historic storms also reduced the bay’s salinity in ways that could have weakened the sharks, some researchers say.

Leopard sharks have been found dead on beaches in Foster City, Hayward, San Francisco, Berkeley and other locations. The die-off has probably killed as many as 1,000 since early March, experts say, because the animals sink to the bottom of the bay when they die in the open water.

And the deaths show no signs of slowing down.

“They appear to be stranding themselves,” said Joshua Porter, a marine biologist with the East Bay Regional Park District. “Park users have pushed them back in the water, but in all reality they are going to die, or work their way back to the sand. When they beach themselves, there’s no coming back from it.”

Similarly unexplained die-offs of leopard sharks occurred in 2006 and 2011, even as far back as 1967.

Leopard sharks, which can grow up to 5 feet long, are the most abundant sharks in San Francisco Bay, and are found from Oregon to Mexico. Although they are not endangered, the sharks are a key part of the food chain in the bay, eating clams, worms, crabs and small fish.

“They are apex predators. If you pull them out of the ecosystem, it’s obviously going to have a pretty big impact,” said Mark Okihiro, senior fish pathologist with the California Department of Fish and Wildlife.

Okihiro, who collected 26 dead leopard sharks two weeks ago near Foster City and Redwood Shores, has been doing autopsies on the animals, called necropsies. He has found a fungus that appears to have invaded the sharks’ bodies through their noses and ducts in their heads, indicating that they may be dying from some type of fungal meningitis.

But much is still unknown, he said, including the species of fungus, how rapidly it is spreading and whether human pollution contributed to it. Okihiro is working with scientists at UC San Francisco and the University of Florida on the detective work.

“There are thousands of fungal species out there in the water and soil,” he said. “It might be very common — and just that these leopard sharks are in the wrong place at the wrong time.”

Some leopard sharks live in the deeper parts of the bay, while others come and go from the ocean through the Golden Gate. Every spring and into the early summer, they congregate in shallow bay waters to breed and give birth.

FUNGUS BLOOMS

It’s possible that the fungus bloomed during the drought as shallow sloughs, lagoons and channels stagnated, Okihiro said. Some sharks also may have become trapped behind tidal gates in places like Foster City and Redwood Shores after the gates were closed to protect homes against surging tides. And the huge storms might have spread the fungal blooms and infected more sharks, he said.

All that new fresh water also could have disrupted the sharks’ health on its own, said Jim Hobbs, a research scientist at UC Davis who has studied the bay’s leopard sharks for the past seven years.

Hobbs noted that leopard sharks do best when the salinity of water is about 20 to 25 parts per thousand, a level typical of San Francisco Bay in most years. But when the sharks are exposed to water below 15 parts per thousand for more than three weeks — as it has been this year — studies show the sharks weaken.

“They go from being able to regulate their internal salt content to not being able to,” Hobbs said. “It causes a whole variety of impairments. They can’t excrete toxins that build up in their bodies.”

When leopard sharks get too much fresh water, their kidneys stop functioning, their immune systems fail and their breathing is limited, he said.

“They essentially just shut down,” he said, and become more vulnerable to fungi, bacteria and human pollutants like fertilizer, pesticides and oil.

CHEMISTRY CHANGE

Normally the sharks would swim toward saltier water, Hobbs said. But this year’s massive storms so dramatically changed the bay chemistry and created strong currents that many sharks may have become disoriented and trapped in the more toxic shallow waters, he said.

Okihiro has not yet been able to do toxicology tests to see if the tissues of the dead sharks have higher levels of human pollution than other sharks, in part because of the cost.

Meanwhile, there have been some recent reports of bat rays and halibut washing up dead.

In March, the bay water near San Francisco International Airport was so diluted from this winter’s storms that its salinity hit 9 parts per thousand — the lowest during any March in 31 years, and far below the historic March average of 21 parts per thousand, according to Jim Cloern, a research ecologist with the U.S. Geological Survey in Menlo Park who has studied the bay since 1976.

“I don’t think we should be surprised that these extreme events that very rapidly flush sea salts out of the bay have effects on organisms,” Cloern said. “I wouldn’t be surprised if there have been die-offs of other species, like oysters and clams.”

But all the rain rushing in from the Delta and Bay Area rivers also helped clean the bay by scouring out old mercury, DDT and PCBs in bay mud out to the ocean, Cloern said. And it brought in sand and mud to build marshes for ducks, geese, shorebirds and fish.

WILL RECOVER

Cloern predicted the leopard shark population will recover fairly quickly. But others working on the issue say even if that occurs, the die-off raises big questions about whether bayfront communities should rescue sharks trapped behind tidal gates and the role human pollution is playing in contributing to the fungal blooms.

“There are so many of them dying,” said Sean van Sommeran, executive director of the Pelagic Shark Research Foundation, a Santa Cruz nonprofit that has collected many of the dead sharks. “They are attractive. They don’t bite people. They are the nicest shark you are going to find.”