Beekeepers in the United States have faced year after year of startling winter losses. The winter of 2018 to 2019 saw a record die-offs of bee colonies, according to the Bee Informed Partnership. A long list of factors—dubbed colony collapse disorder—contribute to the bees’ decline, including two that are closely linked: varroa mites and the deformed-wing virus. Both are taking a growing toll on bees as the pair become increasingly resistant to traditional pest management techniques.

Now, scientists have devised a possible solution, according to a new study published in the journal Science. A team of researchers genetically engineered part of the bees’ microbiome to produce a chemical that causes both the mites and the virus they carry to self-destruct.

“Being able to engineer a gut microbe and specifically regulate gene expression in the host has enormous implications,” as Cornell University insect toxicologist Jeffrey Scott, who was not involved in the study, tells Elizabeth Pennisi at Science magazine. “It is a bit like a customized medicine for honeybees.”

The researchers focused on the European honeybee, the most common domesticated honeybee used for crop pollination around the world. Honeybees all have the same six to eight species of microbes living in their guts, so the researchers picked one bacterial species, Snodgrassella alvi, and put it to work. They gave S. alvi an extra spool of genetic code with the instructions to make double-stranded RNA.

Double-stranded RNA is a powerful tool in bioengineering. After a few molecular alterations, it becomes capable of intercepting and destroying chemical messages in a cell. This process, called RNA interference, won the Nobel Prize for Medicine in 2006.

Because the mites kill bees by feeding on their fat stores, the honeybee researchers decided to tinker with the bees' fat stores. To do so, they used their engineered bacteria to make a double-stranded RNA that targeted the bees’ genes that help them recognize when they’re hungry or full. They ended up with hefty bees, proving that their hacked bacteria had worked. In other words, the dsRNA had spread into the honeybees and interfered with the genes that told them to stop eating.

In the second phase of their work, the researchers turned the bacteria’s weapon on the Varroa mites and the wing-deforming virus. They fed genetically engineered bacteria to small groups of young bees, and then exposed the bees to mites, or injected them with the virus, to see how they fared. Because treated bees’ fat stores were full of double-stranded RNA, the mites were 70 percent more likely to die when they feasted their fat compared than untreated bees. Treated honeybees were also 36 percent more likely to survive the virus compared to untreated bees.

Study co-author Sean Leonard, a microbiologist at University of Texas at Austin, says the chemical signals coming out of the bacteria are “something like a living vaccine,” reports Susan Milius at Science News. Because the bacteria live in the bees’ guts, they’re always producing more of the double-stranded RNA that circulates around the insects’ bodies.

But the research is years away from being applied in commercial hives. The lab tests used groups of only 20 bees of similar ages, and tracked them for only a few weeks at a time. Established honeybee hives can have populations numbering in the thousands, and bees exchange microbiomes with their hivemates. It’s not clear yet how bees share microbes with residents of neighboring hives.

Per Science News, RNA interferences means “you’re turning off genes, and there has to be a very healthy debate about how do we regulate this?” says University of Maryland in College Park honeybee epidemiologist Dennis vanEngelsdorp.

But colony collapse disorder is comprised of lots of other threats, like habitat loss and pesticides. Most of these dangers aren't limited to commercial honeybees, and scientists estimate hundreds of wild bees species are facing the same environmental threats as well. But if the technology translates to large hives, it could mean the end of Varroa mites and the wing-deforming virus in domestic honeybees, according to Science magazine.

For now, "beekeepers are trying their best to keep [mites] in check, but it's really an arms race," the Bee Informed Partnership’s science coordinator Nathalie Steinhauer told NPR’s Susie Neilson in 2019. "That's concerning, because we know arms races don't usually end well."