While it sometimes seems like mosquitoes swarm humans simply to make our lives miserable, they actually ruin our evening strolls and barbecues because they’re hungry. A female mosquito needs to slurp up a belly full of blood to produce her clutch of eggs and her hunger hormones drive her to seek out bare arms and ankles.

But Thomas Lewton at NPR reports that a group of researchers have come up with a novel solution for mosquito control: by restricting the insects’ hunger using diet drugs, they’ve found they can keep the pests from bugging people.

Neurobiology researcher Leslie Vosshall of Rockefeller University, co-author of a new study in the journal Cell, and her team noticed that after taking a blood meal, female mosquitoes didn’t seem interested in feeding for several days afterwards. Since hunger follows the same hormonal pathways in many species, they decided to see if human diet drugs could quiet the mosquitoes’ urge for blood. In particular, reports Matthew Warren at Nature, the team suspected neuropeptide Y receptors (NPY), which are part of the food-seeking pathway for many species including humans, might be involved, so they chose drugs that target NPY.

“On a lark we thought, ‘Let’s go for it. Let’s do the craziest experiment possible and get some human diet drugs and see if they work on mosquitoes,’” Vosshall tells Lewton. “It was surprising that it worked so well.”

To study the effects of the drugs, the team mixed powdered diet drugs with a solution containing the molecule ATP found in most animals that mosquitoes are strongly attracted to, and fed it to female Aedes aegypti mosquitoes, reports NPR’s Lewton. They then presented the mosquitoes with bare human arms and even tempted them with a previously worn nylon stocking, both of which would normally attract large number of the bloodsuckers. But the mosquitoes remained uninterested in food for days after drinking the diet solution.

But that was only half the study. The team then sought to find out which protein in the mosquitoes was reacting with the drug, causing them to feel full. Nature’s Warren reports they cultivated 49 different protein tissues found in the insects and looked at which reacted to the drug. One in particular, the NPY-like receptor 7 (NPYLR7), stood out from the rest. The team then used CRISPR gene-editing techniques to create a mosquito that could not produce NPYLR7. The diet drugs had not impact the gene-edited mosquitoes, suggesting that receptor is where the appetite suppressing action is happening.

But using a human diet drug to control mosquitoes won’t fly outside the lab. First, it would be unsafe to humans and other animals to release those chemicals into the environment. And second, the patents for those diet drugs are owned by pharmaceutical companies, meaning it's unlikely any useful compound inspired by the drugs could be manufactured cheaply. So the team went through a high-speed screening of 265,000 compounds to find ones that would activate the NPYLR7 receptor. Out of that, they found 24 good candidates and one, compound 18, that worked best. Like with the diet drugs, after being exposed to compound 18, the mosquitoes lost interest in biting humans.

“When they’re hungry, these mosquitoes are super motivated. They fly toward the scent of a human the same way that we might approach a chocolate cake,” Vosshall says in a press release. “But after they were given the drug, they lost interest.”

It will take lots of time before compound 18 is ready for primetime, if it makes it to market at all. The team envisions some sort of feeders where the female insects would drink the chemical-laden solution rather than blood and stop biting for several days. It’s also possible that the same chemical could work on ticks and other insects that feed on humans.

Vosshall says this approach has some advantages. Other techniques—like releasing sterilized male mosquitoes or genetically modified males, which leads to the local extinction of the mosquitoes—could have adverse impacts on the environment. The diet drug method has the advantage of limiting the population of mosquitoes without eradicating them and doing unintended harm to local ecosystems.

But Vosshall is knows her new method isn’t a silver bullet. “No single approach has ever worked and will ever work by itself. So we view our idea as a method of behavioral control that can integrate with the other ideas floating around, whether it’s insecticides or GMO mosquitoes,” she tells Ed Cara at Gizmodo. “But anyone claiming that their technology is going to eradicate mosquitoes—it’s just not going to work that way. Nature is just much too smart.”