The immune systems of people who are indigenous to the island of New Guinea may be partly shaped by DNA from an extinct human species, a newly published study says.

Thousands of years ago, the ancestors of modern humans met and mated with Neandertals—and also with their close cousins and contemporaries, Denisovans. Though both Neandertals and Denisovans later went extinct (with Denisovans possibly sticking around until as recently as 15,000 years ago), billions of people around the world still carry the proof of these interactions in their DNA.

Why these genetic fragments from extinct humans have stuck around isn’t entirely clear. But the new study, published on Thursday in PLOS Genetics, finds disease resistance might have been involved. The research—conducted by Irene Gallego Romero, a human evolutionary geneticist at the University of Melbourne in Australia, and her colleagues—suggests that certain mutations from long-gone Denisovans may help today’s Papuans fend off viral infections.

This latest study is one of the first to take a comprehensive look at the role Denisovan DNA plays in humans today, says Joshua Akey, a population geneticist at Princeton University, who was not involved in the research.

The idea that extinct human species continue to shape human biology today isn’t new. In the past decade, researchers have linked Neandertal DNA in modern humans to things ranging from smoking habits to celiac disease. Scientists have also suggested that Denisovan DNA may have contributed to high-altitude adaptation in Tibetans.

But studies that have linked Denisovan mutations to the biology of modern humans have been few and far between. That’s because the bulk of this research has focused on people of European descent, Akey says. Most humans outside of Africa carry an average of 2 percent Neandertal DNA. Denisovan DNA, on the other hand, generally only shows up in people from Asia and the Pacific.

Scientists looking at the biological roots of Denisovan DNA must search outside of the large European genomic data banks. The Indigenous people of New Guinea and Australia have some of the highest concentrations of Denisovan DNA in the world, with an average of around 5 percent of this DNA in their respective genomes. So Gallego Romero and her colleagues decided to sort through the genomes of 56 Papuans to examine what parts of their genetic sequences retained Denisovan DNA.

The team found an unusually high frequency of Denisovan mutations in gene sequences involved in controlling the immune system. As with other studies, the mutations weren’t found inside genes—but rather in the parts of the genome that decide when, where and how much a gene is expressed. In particular, the Denisovan mutations were in regions that control genes involved in responding to viral infection.

But just because the mutations were present in these areas didn’t mean that they actively changed how cells behaved. To test this, the researchers created cells containing some of the Denisovan mutations. They then looked at how these cells expressed genes, compared with those with non-Denisovan genetic variants. Two of the mutations changed the expression of immune genes, suggesting such mutations do impact many Papuans’ immune response.

So why do Papuans still carry these mutations? Adapting to new environments may have been a big factor, Gallego Romero says. “When you think of humans walking around this part of the world 60,000 years ago, one of the biggest challenges is encountering new pathogens that could wipe you out,” she says. Denisovans in New Guinea may have had tens of thousands of years longer to adapt to local diseases before modern humans showed up. Thus, the descendants of people who bred with Denisovans may have carried mutations that helped them overcome the worst of these illnesses.

Such research shows why studying diverse groups can help reveal how humans adjusted to new environments and can “highlight how human diversity is important for adaptation,” says Lluis Quintana-Murci, a population geneticist at France’s Pasteur Institute, who was not involved with the new study. “There [are] so many populations that remain understudied,” he says. With researchers turning their gaze to new populations, “I am convinced that we will learn new things.”