Over-the-counter bedbug treatments, as a 2012 study discovered, are effectively worthless. Most of the time, they fail to reach the bugs, which are burrowed deep in the folds of mattresses and rugs—and even when they do, many of the bloodsuckers have built up an immunity to common household insecticides.

So what’s a person to do in the face of an infestation? Call an exterminator. Freak out. Fight, or give into, the urge to set fire to all belongings.

For the past five years, though, Regine Gries has done none of these things; instead, she has welcomed the bedbugs—thousands of them—onto her skin for a blood feast.

Gries, a biologist at Simon Fraser University in Canada, has endured 18,000 bug bites in the quest to build a more effective bedbug remedy—and as she and a team of researchers explain in a paper recently published in the chemistry journal Angewandte Chemie, they believe they’ve finally discovered the chemicals that will allow them to do just that.

Bedbugs were considered more or less a non-problem through much of the later 20th century, kept at bay with strong pesticides. In recent years, though, bedbug infestations—and, consequently, bedbug hysteria—have made a comeback. (Scientists have also discovered that the bugs may carry the parasite that causes Chagas disease, though they have yet to study their ability to spread the disease itself.)

To study the blood-suckers, Gries and her husband Gerhard, also a biologist at Simon Fraser, collected the feces and other material the bugs left after each blood meal. (Gries was chosen as guinea pig because, unlike most people, she developed only a small, itch-free rash in response to the bites.) The couple was able to successfully isolate a blend of pheromones that attracted the bedbugs, but only in the lab—when they tested the chemical in infested apartments, it had no effect.

Together with Robert Britton, a chemist at Simon Fraser, the researchers tried to figure out what their cocktail was missing. Eventually, they discovered that histamine—the same substance used in human immune responses—acted as a kind of knockout for bedbugs, causing “arrestment on contact” regardless of when they’d last eaten. Together with five pheromones that the team had isolated, they were able to create a two-part chemical trap, first luring the bugs and then freezing them in place.

As the researchers work to turn their discovery into a marketable tool, though, the research continues—meaning the bedbugs stay alive, and stay hungry. “I’m not too thrilled about this,” Gries said in a statement.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.