It’s actually very difficult to attract mosquitoes.

It may not feel that way on a warm and sticky summer night. But every time a mosquito sneaks up to an animal thousands of times its size to feed, it is trying to pull off something extremely dangerous, said Matthew DeGennaro, a mosquito geneticist and professor at Florida International University. The right cues — a whiff of exhaled carbon dioxide, warmth, a bit of body odor, other mysterious elements of animal smell — have to be there, or mosquitoes won’t take the risk.

To design traps that could lure mosquitoes, scientists would love to know how they are picking up on these cues. In a paper published Thursday in Current Biology, Dr. DeGennaro and colleagues report that they have unraveled part of the mystery: They’ve identified a receptor in the mosquito’s antennae that allows the insects to detect lactic acid, a substance from human sweat that the bugs find very attractive.

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

The work began years ago when Dr. DeGennaro, then working in the lab of Leslie Vosshall at Rockefeller University, identified another odor receptor mosquitoes used to home in on prey. However, even with that receptor destroyed, mosquitoes could still find humans as long as carbon dioxide was floating around. That suggested that other receptors, presumably ones that detect carbon dioxide, were compensating for the loss.

Dr. DeGennaro and his colleagues went in search of these other players, starting with a receptor called Ir8a. Its role was not yet clear. The researchers put mosquitoes that had been engineered to lack Ir8a into chambers where they were exposed to various combinations of carbon dioxide, lactic acid, warm temperatures and the arms of human volunteers.