It's not enough for some people on this planet to say they have their mother's eyes – they can now claim to have their great, great, great… (a few thousand greats later) …great grandmother's saliva.

A variation on the gene for our spit's mucus shows signs of having been passed down from a distant ancestor. Not only is this gene unique among modern humans, it looks nothing like the one possessed by our Neanderthal or Denisovan cousins, leaving us to ask; just who did they get it from?

MUC7 is a gene that makes the long strings of protein called mucin, which gives our spit its thick, sticky quality.

Not all MUC7 genes are alike, with a repeating region of code marking out variations that could be useful in tracing back different lineages in our modern human population.

That was the plan for a team of researchers from the University of Buffalo in the US, who analysed the mucin-7 gene from more than 2,500 individual genomes from modern humans to see what secrets these differences might hold.

Previous research had suggested a link between the number of repeating sequences and protection against asthma, though in this instance the researchers didn't find a correlation.

They did happen to find a relationship between the MUC7 gene types and the kinds of microbes we have in our mouth, based on samples of microflora taken from 130 volunteers.

But the big surprise was lurking quietly in the family tree.

"When we looked at the history of the gene that codes for the protein, we see the signature of archaic admixture in modern day Sub-Saharan African populations," says researcher Omer Gokcumen.

In less clinical terms, it means our ancient ancestors did a bit more than catch up for a friendly chat with another group of humans at some point in history.

We're used to seeing archaic admixtures when it comes to multiple trysts between humans and Neanderthals, who interbred on multiple occasions over many tens of thousands of years across Europe and into Asia.

The same goes for the Denisovans, who co-existed with both humans and Neanderthals before continuing on their migration into the east.

Signs of this kind of mingling has left traces of lost human tribes and migrations in our respective genomes, so it isn't surprising to find we inherited a gene from another group of humans.

The fact that the MUC7 gene in Neanderthals and Denisovans resembles the more common variation in modern humans does pose an intriguing mystery.

"Based on our analysis, the most plausible explanation for this extreme variation is archaic introgression – the introduction of genetic material from a 'ghost' species of ancient hominins," says Gokcumen.

'Ghost humans' sounds pretty awesome, we must admit. But before we start thinking of ancient ninja-like hominins leaping through the Palaeolithic shadows, it simply means nobody has a clue where the gene came from.

"This unknown human relative could be a species that has been discovered, such as a subspecies of Homo erectus, or an undiscovered hominin. We call it a 'ghost' species because we don't have the fossils," says Gokcumen.

Whatever these ghosts might have been (we still say ancient ninjas), the interbreeding probably took place roughly 150,000 years ago, a good 1.5 to 2 million years after they split away to start their own band.

To put it into some perspective, we probably parted ways with the ancestors of the Neanderthals about 400,000 years ago, though still stayed in touch over the millennia for the occasional casual booty-call.

Which going by the MUC7 discovery, is not all that uncommon.

"It seems that interbreeding between different early hominin species is not the exception – it's the norm," says Gokcumen.

We've all said goodbye to an ex, promising it'll be the last time, only to catch up again later for romance. This has to be the first time we have evidence that our ancestors not only swapped spit, but also kept it.

This research was published in Molecular Biology and Evolution.