While almost forgotten about in the latter years of the 20th century, the common bed bug (Cimex lectularius) has experienced a dramatic resurgence over the past two decades, with wildly increased levels of resistance to common insecticides helping the blood-sucking pest re-establish its foothold in human dwellings around the planet.

Fortunately, a huge collaborative effort by scientists from dozens of research institutions across the world has resulted in researchers mapping the genome of the bed bug for the first time. The genome sequence will give scientists a far greater understanding of the biological mechanisms that power this impervious parasite, and could even lead to us eradicating the annoyance for good.

The achievement has come in the nick of time, with the bed bug's re-emergence since the 1990s becoming a concern in scientific and public health circles. A 2011 report found bed bugs exist in every US state, with one in five Americans having experienced an infestation in their homes.

"Nobody was ready for this," said entomologist Michael Scharf of Purdue University. "It's reached almost a crisis condition. All big cities in the US are experiencing problems. Our culture had forgotten about bedbugs, and two generations of entomologists haven't had to deal with them."

Scientists believe a number of factors have contributed to the parasites' reappearance, including the prevalence of heated homes, a rise in global travel, and increased resistance to insecticides, with recent research showing the pests' ability to withstand some poisons has increased several thousand times over.

Adding to the bugs' staying power is their ability to survive for months at a time without feeding on human blood, and their tendency to hitchhike from one place to another on things like clothes and baggage. The insects can also easily avoid sprays and insecticides by lurking safely behind the exposed, treatable surfaces of buildings.

"It only takes one pregnant bed bug to jumpstart an infestation of a whole building," said Scharf. "People feel vulnerable. You're being fed upon by something that drinks your blood while you're sleeping."

To analyse the insect's genetic makeup, researchers extracted DNA and RNA from preserved and living bed bug populations. RNA was sampled from both male and female bugs at each of the insects' life stages, and before and after blood meals.

"It's not enough to just sequence a genome, because by itself it does not tell the full story," said one of the researchers, Mark Siddall from the American Museum of Natural History. "In addition to the DNA, you want to get the RNA, or the expressed genes, and you want that not just from a single bed bug, but from both males and females at each part of the life cycle. Then you can really start asking questions about how certain genes relate to blood-feeding, insecticide resistance, and other vital functions."

The findings, published in Nature Communications, suggest that some of the bed bugs' genes linked to insecticide resistance – including detoxification and skin-thickening mechanisms – are only expressed after the parasite first drinks blood, which could help the development of future insecticides.

The researchers also discovered that the bed bug's microbiome harbours more than 400 different species of bacteria. If scientists can figure out how to attack these bacteria – especially ones that might be beneficial to the insects and non-essential for humans – that could be another means of killing the pests.

"Fortunately, we've now got the genome early in the game," said Scharf. "Having this knowledge now might enable us to prevent bedbugs from becoming pests at the level of German cockroaches or disease-transmitting mosquitoes."