Researchers have examined ancient DNA preserved in elephant tusks that were among the cargo of a 487-year-old shipwreck.
Their forensic examination of the 100 tusks pinpointed the devastation caused to the elephant population by centuries of ivory trade.
On this single ship, researchers found genetic evidence of 17 distinct herds of the threatened animals.
Today, scientists can find only four of those herds surviving in Africa.
The tusks were so well preserved - in cold water off the Namibian coast - that scientists were even able to find out what type of diet the elephants had, which revealed where they had lived and been hunted.
The findings are published in the journal Current Biology.
'An incredible find'
The wreck itself is a Portuguese trading vessel, known as the Bom Jesus, which went missing on its way to India in 1533. It was found by chance in 2008 in a coastal diamond mine, making it the oldest known shipwreck in southern Africa.
The ivory in the cargo hold was just part of a vast haul of precious cargo, including copper ingots and gold and silver coins. Archaeologists have also found personal effects and navigation equipment amid the remains of the ship.
"There are dinner plates, cutlery and trinket boxes, as well as all the copper ingots, coins and ivory in the cargo," explained Ashley Coutu, an archaeologist from the University of Oxford, who specialises in genetic and chemical analysis of artefacts.
"It is an incredible find, incredibly well preserved," she told BBC News.
That preservation meant that the international team of researchers - including experts from from Namibia, the US and the UK - could unpick exactly how many herds of elephants the tusks came from.
The team examined something called mitochondrial DNA. Mitochondria are the power stations of every cell, converting food into fuel. And crucially for this study, the genetic blueprint that makes mitochondria is passed down from mother to offspring.
This makes it a particularly revealing piece of code for elephants.
"Elephants live in female-led family groups, and they tend to stay in the same geographic area throughout their lives," explained Alida de Flamingh from the University of Illinois at Urbana-Champaign, who led the study. "We were able to reconstruct complete mitochondrial genomes from these really old samples."
Those completed pieces of genetic code showed that the tusks on this single trading vessel came from 17 distinct elephant herds. The most up to date genetic information about the elephants surviving in that part of Africa today showed that only four of those could be found.
"That was quite shocking - that loss of diversity," said Dr Coutu. "Next we'd really like to fill in those gaps in a chronological way. We can look at where these pinch points are in history and create a timeline of exactly how and when the huge trade in ivory had an impact."
"[What we found] definitely has conservation implications," Dr de Flamingh added: "We know that a loss of genetic diversity is associated with increased extinction risk."
Every tusk is an elephant's life story. What the animals eat creates a fingerprint in the composition of the tusks as they grow - something that scientists can unpick using a technique called isotope analysis.
This essentially breaks down the chemical make-up of every tusk, and it suggested that these were forest elephants - living in mixed forest habitat.
That was a surprise, because by this point in history the Portuguese had established trade with the Kongo Kingdom and communities along the Congo River. So the researchers expected that elephants would be from different regions, especially West and Central Africa.
Battling the ivory trade
The scientists also hope their detailed examination of this ancient ivory could help inform anti-poaching efforts today.
While recent analysis shows elephant poaching has declined slightly, conservationists say the animals are still being poached at unsustainable rates and the trade is a threat to their survival.
When large-scale confiscations of illegal ivory take place, people analyse the DNA to find out where the elephants were killed in Africa.
"Our evidence provides a reference to compare that with, so its origin can be confirmed," said Dr de Flamingh.
"And once you know where the ivory is from you can develop targeted anti-poaching strategies for those locations."
Dr Coutu added: "We're really going to be able to use this historic data to answer modern conservation questions."
Follow Victoria on Twitter