The next time you spot a mosquito alighting on your arm for a sip, definitely take aim. Even if you miss, there’s a good chance the pest won’t target you next time.

It turns out that by slapping at a mosquito about to bite, the insect learns to associate that near-death encounter with your personal scent and avoid you in the future. The work, appearing this week in Current Biology, marks the first time anyone has shown that mosquitoes are capable of learning and remembering.

Related: How Mosquitoes Use Stealth to Steal Your Blood Mosquitoes evade retaliation from their victims by lifting off gently after a meal.

“They’re essentially Pavlov's mosquitoes,” says University of Washington neuroecologist Jeff Riffell, referring to the famous experiment that conditioned dogs to salivate on cue. Like those canines of science lore, Riffell used classical conditioning to test whether his insect subjects could learn to associate a negative stimulus with a scent.

Mosquitoes are drawn to certain odors wafted by tasty targets, including humans. While bathed in a highly attractive human scent, Aedes aegypti mosquitoes were exposed to a 20-minute session of little bite-disturbing vibrations, similar in intensity to the reverberations that travel up an arm after a slap.

Riffell’s team found that these mosquitoes then avoided that scent for more than 24 hours afterward—an effect as powerful as an application of over-the-counter repellent sprays made with DEET. (Related: Are mosquitoes necessary?)

Because learned associations are linked to the brain chemical dopamine, Riffell and his team tested the effect again, but this time on mosquitoes whose dopamine channels had been disabled. Sure enough, that group of insects wasn’t able to learn that a particular scent meant danger, and they dived right back in.

“That learning ability makes them incredibly flexible,” Riffell says. “It means they can learn associations about who is more defensive and who isn’t, and if we can prevent that, they’ll never learn and can be swatted away way more effectively.”

Fighting the Bite

Aedes aegypti is the mosquito species known for carrying yellow fever and is a vector for several other serious human maladies, including dengue fever, chikungunya, and the Zika virus. The dopamine-learning discovery opens new avenues of research for developing insecticides or repellents.

View Images The scientists tested mosquitoes in the lab to see how they reacted to scents after being exposed to vibrations akin to swatting. Photograph Courtesy of Kiley Riffell

“Memories are an important thing, and it was completely out of the picture in mosquito research,” says Walter Leal, a chemical ecologist at the University of California Davis who also studies human-mosquito interactions.

“Now that we know that some compounds trigger this memory of avoidance, one could possibly use a formulation that not only includes an active repellent, like DEET, but also includes some compound that would trigger the memory of avoidance,” Leal says.

“We’ve been using all these single-compound repellants like DEET for more than 60 years now, and we need to move on.” (Find out how mosquitoes might meet their end—thanks to Marlon Brando.)

But the mosquito species in question may only be able to learn associations with chemicals related to their main host species. The mosquitoes that transmit West Nile, for instance, feed primarily on birds but will switch to humans when their preferred meal is unavailable. So far, Riffell says, they haven’t shown an ability to learn to avoid humans in the same way that A. aegypti does.

“We can’t get them to learn, so something’s going on there,” Riffell notes.

That’s not so surprising, says Leal: “Just like people, there are many things you can’t smell, and many you just ignore. Mosquitoes also don’t have receptors for everything.”