Scientists think they have figured out how a trove of ancient marine mammal fossils ended up in a Chilean desert 40 metres above sea level.

The fossils were found at Cerro Ballena — Spanish for "whale hill" — in Chile's Atacama desert in 2010 by crews who were expanding the Pan-American Highway from two to four lanes.

"It's the richest site for fossil marine mammals in the world," said Nick Pyenson, a paleobiologist with the Smithsonian Institution in an interview with CBC's As It Happens.

The fossils include almost complete skeletons, many of them overlapping, for 40 large whales, along with dolphins, seals, large fish related to swordfish or marlins, and extinct species such as aquatic sloths and dolphins with walrus-like faces that lived six million to nine million years ago.

At first glance, the grouping looks like some of the mass strandings today in which dozens of whales or dolphins wash up on beaches around the world. Most of them die within a few days.

But Pyenson and his team came up with a slightly different explanation for the pile of fossils after carefully analyzing the condition, orientation and position of the bones using 3D imaging techniques. They concluded that the animals died suddenly at sea and then washed up on the same shore.

"The best explanation we have is toxins from harmful algal blooms likely caused the sudden death of all the marine organisms that we see at this site," he said. "And they were buried on a tidal flat that then became Cerro Ballena."

Similar events today can also cause the sudden mass deaths of marine mammals, he added.

"What's really interesting is that this didn't just happen once [at Cerro Ballena]. It happened four times," Pyenson said, adding that the fossil site has at least four layers.

Over time, overlapping tectonic plates pushed the former shoreline high up above sea level, where it is now a desert less than a kilometre from the modern-day coastline.

The researchers published their analysis and conclusions in the journal Proceedings of the Royal Society B this week.

Pyenson said a key clue was that most of the whales were buried belly up.

"Now, a whale doesn't strand belly up unless it arrives dead to the shoreline…. What we see at Cerro Ballena is actually a graveyard, not a murder site."

The fact that similar events happened repeatedly also pointed to toxic algae as the cause.

The fossils impeding the road construction were dug up by paleontologists and now reside in museums, allowing the highway expansion to go ahead. but the researchers think up to several hundred skeletons may remain undiscovered on either side of the highway.

"You can go there today and look on either side of road cut, and there are still whale skulls going into the cliff face," Pyenson said.

The researchers hope their new results will inspire enough interest that their Chilean colleagues can establish a field station at the site and preserve and study the remaining fossils.