A new study out of Oxford University sought to examine the genetic history of North and South America, finding that it’s far more complex than originally believed — and is heavily influenced by colonization and the slave trade hundreds of years ago.

The study analyzed over 4,000 DNA samples spanning 64 different populations in Europe, Africa, and the Americas. The research team focused primarily on comparing African and European populations with American populations — since during the past several hundred years, migration has mainly occurred from Africa and Europe coming to the Americas.

“We found that the genetic profile of Americans is much more complex than previously thought,” Professor Cristian Capelli, an author of the study and a professor at the Department of Zoology at Oxford, said in the press release.

In particular, they found that the majority of European ancestry in American Hispanic and Latino populations comes from Spain — but also that the most common European genetic source in African-Americans comes from Great Britain. They also found that Caribbean countries had a greater genetic contribution from Africa.

“We can see the huge genetic impact that the slave trade had on American populations and our data match historical records,” Dr. Garrett Hellenthal, an author of the study, said in the press release. “The majority of African Americans have ancestry similar to the Yoruba people in West Africa, confirming that most African slaves came from this region. In areas of the Americas historically under Spanish rule, populations also have ancestry related to what is now Senegal and Gambia. Records show that around a third of the slaves sent to Spanish America in the 17th Century came from this region, and we can see the genetic evidence of this in modern Americans really clearly.”

Last year another group of researchers, also from Oxford University and in collaboration with the University College London (UCL), produced a similar study examining the genetic histories of 95 different populations from all over the world, rather than just the Americas. They designed an interactive map to show readers how human genes were mixed across the last four millennia in Europe, Africa, Asia, and South America — finding that European colonialism, the Arab slave trade, the Mongol Empire and Silk Road traders mixing with Chinese people all had influenced the genetic makeup of these continents.

Examining the endless complexities of genetic history may seem like a daunting task: but researchers say it’s all in the DNA. The older study, published in Science, examined the DNA of 1,490 people across these 95 populations.

“DNA really has the power to tell stories and uncover details of humanity’s past,” Dr. Simon Myers of Oxford University’s Department of Statistics, and an author of the study, said.

In the most recent study, the researchers used a technique known as haplotype-based analysis in comparing the genes. They hope to use a similar technique in further investigating the genetic patterns and pasts of other diverse populations, such as Brazilians.