A publicity still for Alfred Hitchcock's 1963 thriller The Birds, in which flocks of crazed birds attack and kill residents of a coastal California town.

Moviemaker Alfred Hitchcock appears to have drawn some inspiration for one of his classic thrillers, "The Birds," with the help of toxin-producing algae.

The algae, whose single cells are encased in glass walls, have been the prime suspects for some time, but now scientists have confirmed they were present at just the right time.

On Aug. 18, 1961, a local newspaper reported that thousands of crazed seabirds were sighted on the shores of North Monterey Bay in California. The birds, called sooty shearwaters, regurgitated anchovies, flew into objects and died on the streets.

Hitchcock lived in the region, and called the newspaper, the Santa Cruz Sentinel, for more information, according to Sibel Bargu, a biological oceanographer at Louisiana State University and one of the study researchers.

The frenzy helped inspire Hitchcock's 1963 thriller "The Birds," which was adapted from a short story by Daphne du Maurier. In the movie, flocks of birds attack and kill residents in a community on the California coast. [Top 10 Scariest Movies Ever]

The cause of the outbreak in 1961 was not identified. Then, 30 years later, disorientation and death struck brown pelicans in the same area.

"It looks like attacking, but it's actually crashing into walls, because they are very disoriented," Bargu said.

But this time, it was found that the birds had eaten a toxin, domoic acid, produced by multiple species of Pseudo-nitzschia, which are diatoms, a type of algae.

Domoic acid can cause confusion, disorientation, scratching, seizures and death in birds that eat the stuff, which gets concentrated as it moves up the food chain.

Domoic acid also affects mammals; humans can contract life-threatening amnesic shellfish poisoning, which causes, among other things, short-term memory loss, by eating shellfish that have eaten toxin-filled plankton.

Bargu and colleagues looked back about half a century by examining the gut contents of tiny floating marine animals, called zooplankton, collected July-August of 1961 in Monterey Bay and now housed in a collection at the Scripps Institution of Oceanography.

They found that toxin-producing species of Pseudo-nitzschia accounted for 79 percent of the diatoms present in the guts of these tiny animals at the time.

"We suggest that domoic acid generated by these diatoms accumulated in the food chain and led to the poisoning of migratory flocks of shearwater that foraged in these waters," Bargu and her team write in a study published in the January 2012 issue of the journal Nature Geoscience.

Warm-water, low-wind conditions favor the growth of these toxin-producing diatoms, according to the researchers.

You can follow LiveScience senior writer Wynne Parry on Twitter @Wynne_Parry. Follow LiveScience for the latest in science news and discoveries on Twitter @livescience and on Facebook.