There have been about 15,000 generation of human beings on our planet, and some 500,000 generations of cockroaches. Now we learn that the inglorious bedbug has been a parasitic companions with other species aside from humans for more than 100 million years, stalking their hosts at the same time as dinosaurs.

Experts have now discovered that the evolutionary history of bed bugs is far more complex than previously thought and the critters were actually in existence during the time of dinosaurs. More research is needed to find out what their host was at that time, although current understanding suggests it’s unlikely they fed on the blood of dinosaurs. This is because bed bugs and all their relatives feed on animals that have a “home—such as a bird’s nest, an owl’s burrow, a bat’s roost or a human’s bed—a mode of life that dinosaurs don’t seem to have adopted.

“The first big surprise we found was that bedbugs are much older than bats, which everyone assumed to be their first host,” said Steffen Roth from the University Museum Bergen in Norway, who led the study. “It was also unexpected to see that evolutionary older bedbugs were already specialized on a single host type, even though we don’t know what the host was at the time when T. rex walked the earth.”

Work by an international team of scientists, including the University of Sheffield, compared the DNA of dozens of bedbug species in order to understand the evolutionary relationships within the group as well as their relationship with humans.

The team discovered that bedbugs are older than bats—a mammal that people had previously believed to be their first host 50-60 million years ago. Bedbugs in fact evolved around 50 million years earlier. Bedbugs rank high among the list of most unwanted human bedfellows but until now, little was known about when they first originated.

The team spent 15 years collecting samples from wild sites and museums around the world, dodging bats and buffaloes in African caves infected with Ebola and climbing cliffs to collect from bird nests in South East Asia.

“To think that the pests that live in our beds today evolved more than 100 million years ago and were walking the earth side by side with dinosaurs, was a revelation,” said professor Mike Siva-Jothy with the University of Sheffield. “It shows that the evolutionary history of bed bugs is far more complex than we previously thought.”

The study also reveals that a new species of bedbug conquers humans about every half a million years: moreover that when bedbugs changed hosts, they didn’t always become specialized on that new host and maintained the ability to jump back to their original host. This demonstrates that while some bedbugs become specialized, some remain generalists, jumping from host to host.

Professor Klaus Reinhardt, a bedbug researcher from Dresden University in Germany, who co-led the study, said: “These species are the ones we can reasonably expect to be the next ones drinking our blood, and it may not even take half a million years, given that many more humans, livestock and pets that live on earth now provide lots more opportunities.”

The team also found that the two major bedbug pests of humans—the common and the tropical bedbug—are much older than humans. This contrasts with other evidence that the evolution of ancient humans caused the split of other human parasites into new species.

Professor Mike Siva-Jothy from the University of Sheffield, added: “These findings will help us better understand how bedbugs evolved the traits that make them effective pests—that will also help us find new ways of controlling them.”

The researchers hope the findings will help create an evolutionary history of an important group of insects, allowing us to understand how other insects become carriers of disease, how they evolve to use different hosts and how they develop novel traits. The aim is to help control insects effectively and prevent the transmission of insect-vectored disease.