Excavators working on a Chilean stretch of the Pan-American Highway made a surprising discovery in 2010: a set of large fossilized mammal bones. A team of paleontologists was able to identify the fossils as the remains of more than 40 baleen whales, alongside a host of smaller animals, found to have died between 6 and 9 million years ago.

The paleontologists were able to identify the species of whale found — they included a sperm whale species and a "walrus-like" whale, both of which are extinct — but until recently, did not know what caused them to die and make their way into a mass grave. Now a team of Smithsonian scientists says it has found the culprit: algae.

Algae has been blamed for other mass whale deaths in recorded human history. Nicholas Pyenson, lead author of the fossil study, describes a case from the late 1980s in which more than a dozen humpback whales washed up near Cape Cod. The animals had "no signs of trauma," Pyenson said, but were "sickened by mackerel loaded with toxins from red tides." Blooms of toxic algae are particularly common along coastlines where rivers can deposit minerals such as iron into the sea. The Smithsonian says those minerals — common in the Andes mountain range and washed down by a network of waterways — have for 20 million years provided "the ideal conditions for harmful algal blooms to form" along the west coast of the continent.

The mass deaths occurred four times within 16,000 years

Scientists were clued to the cause of the whales' deaths by the formation their bones lay in. Four distinct layers of fossils sat on top of each other, their orientation suggesting the animals in each layer had died at sea at around the same time, before washing onto the tidal flat that would later become the Pan-American highway roadside. The layering suggested the toxic algae blooms occurred four times within a period of 10,000 to 16,000 years. The lack of large land scavengers in the area at the time ensured that the dead animals' bones were preserved in place.

The paleontologists only had a short time to collect the fossil records, as construction on the Pan-American highway itself was set to continue. Rather than attempt to extract as many carcasses as possible, Nicholoas Pyenson and his team used 3D-imaging technology to scan the dig site before it was paved over with new road. They have now made their data available on a dedicated website, which allows users to take a virtual tour of the dig site, see the whale skeletons in a 3D-image viewer, or download their data for 3D printing.