Dungeness crabs on display at Fisherman's Wharf in San Francisco.Getty Images

A potentially deadly poison could be headed to a seafood restaurant near you.

A new study has found a connection between warmer oceans and hazardous levels of domoic acid — a dangerous neurotoxin produced by tiny algae that can accumulate in crabs, mussels and other sea life. The toxin first caught the attention of public health officials in 1987, when three people died and more than 100 fell ill after eating toxic shellfish from Prince Edward Island.

Pseudo-nitzhschia spp., the phytoplankton that produce domoic acid.Courtesy of Anthony OdellA satellite image of the West Coast captured by the Suomi satellite in February 2016, during an especially high period of toxin levels that forced regional commercial and recreational shellfish harvests to close.NASA

This, in turn, has allowed them to create a weather-forecast type model that acts as both a predictor and a warning for seasonal changes in domoic acid levels. Coastal fisheries, as well as federal and state agencies, in the Pacific Northwest can use the model to protect public health and manage the potential economic fallout.

“If you didn’t have this information and the continuous monitoring, that’s like driving down the road with your headlights off,” Marc Suddelson, program manager of the National Oceanic and Atmospheric Administration’s MERHAB lab, told The Post.

In 2015, the West Coast Dungeness crab fishery lost nearly $100 million after an algae bloom off the coast of California created dangerous levels of domoic acid. That same bloom killed dozens of sea lions off the coast of Monterey, California.

The toxin attacks the brain and affects humans and animals alike. It can cause seizures, vomiting, diarrhea, coma, memory loss and, in severe cases, death. Alfred Hitchcock’s 1963 horror film “The Birds” was inspired by a 1961 incident in which thousands of birds — infected with domoic acid — went nuts on the shores of Monterey Bay, California.

The study was 20 years in the making, with researchers combining NOAA and state data on climate, ocean temperatures, plankton and toxicity in Oregon shellfish.

“NOAA was able to combine those existing data streams and develop a new understanding of how they relate to each other,” said Suddelson.

A closeup of a zooplankton.Courtesy of Jay Peterson

So how can domoic acid end up on your dinner plate? Phytoplankton (specifically pseudo-nitzschia) produce domoic acid during an algae bloom. These tiny, one-celled organisms are the foundation of the entire oceanic food chain. The study showed that El Nino and other climate phenomena are causing more toxic phytoplankton, and less good phytoplankton, to bloom.

Razor clams from a digging event in Washington.NOAA

Researchers don’t know why this is yet, just that the warmer ocean temperatures are having an effect. “One educated guess is the warmer water has less food,” said Morgaine McKibben, the lead author of the NOAA-supported study, suggesting that the toxic algae is alpha-dogging the good algae.

Then zookplankton, as well as clams and mussels, eat the domoic acid-laden phytoplankton. Dungeness crabs eat clams, and then humans eat the crabs.

Ironically enough, crabs and mussels don’t get sick from the domoic acid. It lingers in their shells for varying amounts of time, depending on the species (mussels can be weeks, razor clams can be months,) until an unsuspecting sea lion, dolphin or human eats it for dinner.

But even though El Nino and PDO are generating the conditions that allow this toxicity to bloom, it’s not necessarily manmade climate change.