Sometime between six and nine million years ago, in a stretch of the Pacific Ocean just off of South America, something kept killing whales. Lots of them.

At least thirty baleen whales died, their bodies washed onto a tidal mudflat and buried over time. Species of sperm whale and a walrus-like whale, both now extinct, also died, along with seals, billfishes, bony fish and aquatic sloths. These die-offs, known as mass strandings, appeared to have happened over and over, with the animals buried in sediment between each episode.

Epochs passed. The skeletons, hidden underground, gradually fossilized. Geologic subduction pushed the sediment upward by about 130 feet, lifting the mud flats and transforming them into dry land in what's now known as Chile's Atacama Desert.

Then, in October 2011, during the final moments of a paleontological expedition in the fossil-rich region, Smithsonian researcher Nick Pyenson decided to look at the sediments being exposed by the widening of the Pan-American Highway from two lanes to four right near the coast. Stumbling upon evidence of the deaths, he and his colleagues were astounded by what they saw—dozens of complete, ancient whale fossils, along with those of several other species, including an extremely rare ancient dolphin species that had only been found a handful of times previously.

"At least ten different kinds of marine animals, recurring in four different layers," Pyenson says. "It begged for an explanation."

The problem: The road would be widened within two months, and the fossils had to be removed immediately.

This, of course, is a major no-no in paleontological research. Taking a fossil from its site erases its geological context, the main clue Pyenson and other researchers could use in figuring out what caused all these deaths in the first place.

The solution: lasers. Soon after the discovery, Pyenson returned to the site with Vince Rossi and Adam Metallo of the Smithsonian Digitization Program Office. Within a week's time, they used laser-powered digitization methods to create digital 3D renderings of the site, and its fossils, in extreme detail.

With these digital renderings, Pyenson and other researchers could inspect the fossils in their original context at their leisure, even after they'd been removed. Digital models of the whales could also be shared electronically with other scientists, and the researchers eventually made them publicly available (below: a baleen whale fossil), along with a datasets of their dimensions that allow anyone to print them at any scale.

Over the next few years, Pyenson, Carolina Gustein of the Universidad de Chile and other members of Pyenson's Natural History Museum lab used the digital models and the original fossils to investigate the mystery of the site, called Cerro Ballena (Spanish for "whale hill"). Analysis of the surrounding sediments showed they had been part of a tidal flat environment, and the fossils—a broad mix of both adult and juveniles of different species—were deposited in four distinct layers over the course of about 16,000 years.

Intriguingly, the fossils' positions suggested they hadn't been killed at the site itself. "The baleen whales were mostly belly-up, and whales are generally only belly-up if they arrive at someplace dead," Pyenson says. "This is a graveyard, it's not a murder site—the murder happened elsewhere."

He and colleagues investigated possible explanations—a tsunami, or a virus—but they didn't fit the data. There was no geologic evidence of a powerful tsunami, such as sand deposits where they shouldn't be, and the fossils were in excellent condition, relatively intact. Viruses and other pathogens tend to be species-specific, making it unlikely they'd kill such a diversity of animals.

"I realized there's only one good explanation for it: harmful algal blooms," Pyenson says. As he and colleagues detail in an article published today in Proceedings of the Royal Society B, sudden blooms of many types of algae can produce high concentrations of toxins that quickly kill large herbivorous marine mammals when they inhale or eat them. Carnivorous animals, meanwhile, die after eating prey laced with them, causing organ failure.

There are countless modern examples of algal blooms killing large marine animals, including a recent red tide off the coast of Florida that led to the deaths of thousands of manatees. The closest analog for the Cerro Ballena die off may be a 1987 incident in which dozens of humpback whales washed ashore on Cape Cod, and autopsies of dead whales showed they'd just eaten mackerel dense with red tide toxins.

In modern times, algal blooms can be triggered by human activities (fertilizer-laced water runoff, for instance) but also by the natural discharge of minerals such as iron into water, which feeds the explosive growth of algae. The Chilean coast nearby Cerro Ballena, as it happens, is chock full of iron deposits, and sudden rain in the arid region can carry it into the ocean via runoff.

The researchers can't prove it definitely, but it seems most likely this mechanism is responsible for the bounty of whale fossils found during the widening of the highway. They also plan to continue excavating in the area, with the hope of potentially finding evidence of other algae-driven mass strandings that, Pyenson believes, likely happened elsewhere along the coast.

They also hope to set an example. "There's a large industry of illegal fossil trafficking in the region," Pyenson says. "A lot of what our team is trying to do is legitimize scientific research" in the eyes of the public. He adds, "Fossils are non-renewable resources, and the more that we can protect them, the more we can understand what they tell us about the past."