Mosquitoes weren't always annoyingly biting us, so how is it that they acquired a taste for human blood?

"It was a really good evolutionary move," Leslie B. Vosshall, lead author of a new study, said in a statement. "We provide the ideal lifestyle for mosquitoes. We always have water around for them to breed in, we are hairless, and we live in large groups."

Ancestors of these pesky insects fed on furry forest animals, that is, until thousands of years ago they made the smart switch to humans. Now, female mosquitoes like those that spread dengue and yellow fever use our blood to nourish their eggs.

To understand the evolutionary basis for their attraction to us, Vosshall and her colleagues examined the genes that drive some mosquitoes to prefer humans. Described in the journal Nature, they note that our scent is what is particularly mouth-watering.

Researchers focused on two species of mosquitoes in Kenya, the subjects of previous research - Aedes aegypti formosus, a subspecies of black mosquito that tends to lay its eggs outdoors and prefers to bite forest animals, and their light-brown cousins, Aedes aegypti aegypti, which mostly bite humans.

"We think we can get a glimpse of what happened thousands of years ago by looking at this little village in Kenya because the players are still there," Vosshall explained.

To zero in on the genes responsible for the human-loving mosquitoes' preference, the researchers crossbred the mosquitoes, creating thousands of genetically diverse grandchildren and separating them based on odor preference.

"We knew that these mosquitoes had evolved a love for the way we smell," Vosshall added.

The research team ended up finding 14 genes strongly linked to liking humans, with one odor receptor gene in particular, Or4, standing out. Vosshall and her colleagues believe that Or4 is used to hone in on human scents specifically.

"There's a whole suite of things that mosquitoes have to change about their lifestyle to live around humans," Vosshall said. "This paper provides the first genetic insight into what happened thousands of years ago when some mosquitoes made this switch."