What causes algal blooms to become toxic?

The disastrous 2015-16 Dungeness crab season, delayed and shortened by an unprecedented bloom of toxic algae, is a bitter memory for the West Coast fishing industry. The culprit was domoic acid, a potent neurotoxin produced by marine algae and discovered in 1987 as the cause of amnesic shellfish poisoning.