Three years ago, scientists thought humans had never had sex with Neanderthals.

However, new research shows that neanderthals and other extinct humans might have endowed some of us with the genetic, robust immune systems we enjoy today.

By now, scientists know that four percent of Neanderthal DNA and up to six percent of Denisovan DNA are present in some modern humans in Europe, Asia and Oceania.

Scientists believe that these genes must have helped modern humans thrive, while migrating throughout the world.

The cross-breeding wasn't just a random event that happened, it gave something useful to the gene pool of the modern human, said Stanford University's Peter Parham, senior author of the study in the journal Science.

According to the study, although modern humans, Neanderthals and Denisovans have common ancestors in Africa, they split up about 400,000 years ago.

Researchers used DNA inherited from the Neanderthals and the Denisovans, the recently discovered hominids, to find out what genes intersected. Previous research had indicated that prehistoric interbreeding led to up to four percent of the modern human genome.

We are finding frequencies in Asia and Europe that are far greater than whole genome estimates of archaic DNA in modern human genomes, which is 1 to 6 percent, said Parham.

BBC News reported, researchers concluded mating with Neanderthals and another ancient group called Denisovans introduced genes that help us cope with viruses to this day.

The study did a close analysis of a gene group called human leukocyte antigen (HLA) class I genes, responsible for making HLA proteins that help the immune system adapt to defend against new pathogens that could cause various infections, viruses and diseases.

The HLA genes that the Neanderthals and Denisovans had, had been adapted to life in Europe and Asia for several hundred thousand years, whereas the recent migrants from Africa wouldn't have had these genes, said study leader Peter Parham from Stanford University School of Medicine in California.

The researchers say that is because after ancient humans left Africa some 65,000 years ago, they started breeding with their more primitive relations in Europe, while those who stayed in Africa did not.