Nectar-slurping hummingbirds clearly ­have a taste for sweets — but they shouldn't. Like all other birds, they lack sweet-taste receptors on their palates and long tongues, so in theory, they should be immune to the temptations of sugary foods.

However, new research reveals why hummingbirds feast freely on nectar: At some point in their evolution, the birds transformed a taste receptor that's typically used to detect savory or umami flavors into one that's used to taste sweets instead.

Hummingbirds are constantly wavering between a sugar rush and starvation. Their metabolisms are hyperactive, their hearts can beat 20 times a second, and they often need to eat more than their body weight in food each day to stay alive. [Images: Beautiful Hummingbirds of the World]

The small birds eat the occasional insect, but they largely subsist on nectar from flowers, which is not a typical source of food for most other birds. As a result, hummingbirds have been able to carve out a distinct environmental niche. The birds can now be found throughout North and South America, in habitats ranging from high-altitude mountains in the Andes to tropical rainforests, and they're quite diverse. They have split into more than 300 species in the estimated 42 million years since they parted from their closest relative, the insect-eating swift.

Scientists have been puzzled by the fact that hummingbirds maintain such a sugary diet without a sweet-taste receptor. For most mammals, the sweet-taste receptor that responds to sugars in plant-based carbohydrates is made up of two proteins: T1R2 and T1R3. The taste receptor that detects savory, or umami, flavors found in meat and mushrooms is made up of the proteins T1R1 and T1R3.

But after the chicken genome was sequenced in 2004, researchers noticed the birds lacked the gene that encodes T1R2, a crucial component of the sweet-taste receptor. This same pattern was seen in other bird genomes.

"If a species is missing one of those two parts, then the species can't taste sweet at all," said Maude Baldwin, a doctoral student of evolutionary biology at Harvard University and one of the researchers on the study.

When scientists sequenced the genomes of cats, lions, tigers and cheetahs — true carnivores that also don't have a taste for sweets — they found these species still have a nonfunctional "pseudogene" (a nonfunctional gene that's lost its protein-coding powers) for the sweet-taste receptor. But in bird genomes, scientists never even found a trace of a pseudogene for a sweet tooth, Baldwin told Live Science.

To figure out what made hummingbirds like sweets despite their lack of the sweet-taste receptor, Baldwin and colleagues cloned the genes for the T1R1-T1R3 taste receptors from omnivorous chickens, insectivorous swifts and nectivorous hummingbirds. The researchers then tested how the taste-receptor proteins produced by these genes reacted to different "flavors" in a cell culture.

For chickens and swifts, the receptor had a strong reaction to the amino acids behind umami flavors. The hummingbird receptor, on the other hand, was only weakly stimulated by umami flavors, but it did responded strongly to the sweet flavors of carbs, the researchers found.

Then, to look for the molecular basis for this change in function, Baldwin and colleagues made taste-receptor hybrids using different parts of the chicken and hummingbird receptors. They found that by mutating the chicken receptor in 19 different places, they could get it to respond to sweets, but the researchers suspect there are more mutations that contributed to the change in hummingbirds.

Further research could eventually show where this change for hummingbirds arose in the evolutionary process — and how other nectivores like orioles and honeyeaters developed a taste for sweets. It's still not clear why birds lost their sweet receptor in the first place, but perhaps it was due to the loss of sweets in their diet.

"Birds are the descendants of carnivorous dinosaurs, so maybe this gene was lost early on because of the diet of their ancestors," Baldwin said. "That would be very cool, but we're still not sure."

The findings were detailed today (Aug. 21) in the journal Science.

Follow Megan Gannon on Twitter and Google+. Follow us @livescience, Facebook& Google+. Original article on Live Science.