Though humans today are at little risk of being chomped on by a T. rex, they’re still vulnerable to bites from a different prehistoric pest: bedbugs.

A new study from an international team of researchers finds that bedbugs evolved about 100 million years ago, when dinosaurs still ruled the Earth, making them twice as old as entomologists had previously believed. Earlier hypotheses suggested bats were the parasitic insect’s first hosts, but fossil records and DNA evidence show the critters actually appeared tens of millions of years beforehand, according to the study published this week in Current Biology.

“The first hosts that we can track are bats,” says co-lead author Klaus Reinhardt, a bedbug researcher at Dresden University of Technology in Germany. “But the oldest [bat] fossil is [from] about 50 or 60 million years ago. … It's impossible that bats would be the first host of bedbugs because they were around before any kind of proto-bats were flapping through the air.”

The researchers used genetic material from 34 species of bedbugs, collected over 15 years, to trace back the insect’s evolutionary tree. While some of the samples were provided by natural history museums or other scientists in the field, others required a little more legwork. Reinhardt says authors jetted all over the world, from Africa to South America to southeast Asia, in hopes of tracking down as many genera as possible. After a lot of time wading knee-deep in bat guano to snag the bugs from cave walls, the team gathered specimens from five out of six bedbug subfamilies to develop an updated evolutionary history for the parasitic pests.

From those collected specimens, the researchers extracted DNA samples and, focusing on five particular spots in the genome, compared their results between genera to understand how the bedbug family tree fits together. With the assumption that genes change at a constant rate, they could then work backward to come up with a timeline for bedbug evolution.

That earlier date is also supported by two ancient fossils—one of a precursor to bedbugs and related species, and another of an early bedbug—both of which would place bedbugs’ appearance at around 100 million years ago, Reinhardt says. If this is the case, bedbugs first showed up in the Cretaceous period, meaning the critters scuttled around alongside swooping pterodactyls and big-horned triceratops.

Though people might like to imagine the great T. rex moaning about its itchy bites, Reinhardt says it’s unlikely dinosaurs served as hosts for bedbugs. The pests prefer to feed on animals that settle down in cozy groups, and dinosaurs tended to be more free-roaming. Certain small mammals from the time are more likely candidates, but Reinhardt says more work is needed to uncover which creatures were the first to suffer the bedbug’s tiny wrath.

Tom Henry, an entomology curator at the Smithsonian National Museum of Natural History, says the authors’ work creates a lot of questions for future researchers to answer. Though it’s possible that bats did evolve earlier and we simply don’t have the fossil evidence yet, the study prompts entomologists to rethink their understanding of bedbugs’ original host.

“Their phylogenetic reconstruction, using the known fossil record, provides convincing evidence that bedbugs evolved before bats,” Henry says in an email. “In which case, they necessarily fed on other ancestral mammals, perhaps a precursor to bats, that also lived in caves or other protected areas.”

The study also disputes previously accepted ideas about how the parasites’ feeding patterns evolved. Earlier hypotheses held that bedbugs grew pickier over time, shifting from generalists that fed on whatever came their way to specialists that stuck to specific hosts as food sources. This pattern has been observed in other species; those that focus their efforts on a specialized diet can become highly efficient at acquiring nutrients from select sources, and sometimes they out-compete their less finicky counterparts.

However, the researchers’ results don’t support an overall shift from generalist to specialist feeding patterns, Reinhardt says. In fact, in a number of cases, the parasites seem to have expanded their diets.

The three documented times bedbugs have evolved to feed on humans, for example, appear to support the idea that bedbugs can become generalists. Rather than switching over from their earlier specialized diets, bedbugs simply added humans to the menu when the opportunity arose, Reinhardt says. The authors aren’t sure what might prompt a shift in this direction, other than the vague notion that bedbugs might be taking advantage of “ecological opportunities.”

“Say you're a bat specialist and you live in a cave, and suddenly you have this really nice, smelly, juicy human coming there all the time. This would be an ecological opportunity for a new food source,” Reinhardt says. “If you as a species still retain the ability to suck on these bats, but also have the ability now to suck on humans, then by some definition, you would already be some kind of a generalist.”

Still, the understanding of the proposed specialist-to-generalist evolution is far from complete, Reinhardt says. And ecological opportunity doesn’t take hold in all cases, as the authors found that when they tried to offer their own bodies as sustenance to some of their live specimens, the bugs turned up their noses, refusing to feed.

The shifted timeline for bedbugs also comes into conflict with theories of the evolution of two varieties of pest that commonly plague humans today: the tropical and the common bedbug. While other researchers believed the evolutionary rift occurred because the bugs developed while feeding on separate species of early and modern humans—Homo erectus and Homo sapiens—the study authors calculate that the bedbug species split off more than 30 million years before their human hosts walked the Earth.

The authors’ results could influence how we understand evolution not just of bedbugs, but of other species of parasites as well, Henry says.

Reinhardt admits it was a little “unsatisfying” that the study’s results challenged a lot of earlier assumptions without finding positive answers to replace them, but he hopes the lingering questions will lead to further research.

“You have to rewrite some of the textbook ideas about why there are human-parasite species pairs,” Reinhardt says. “You have to rewrite a little bit of what the original host is.”