American scientists have cracked the mystery of honeybees moving like zombies before dying. The strange behavior and deaths are linked to the collapse of honeybee colonies in the U.S. since 2006 that is threatening crop production.

San Francisco State University professor of biology John Hafernik reported in a study published in the open access science journal PLoS ONE this week that brown flies are parasitizing honeybees, using their bodies as living food for their larvae similar to how the monster in the U.S. movie franchise "Alien" breeds.

According to the study, the fly Apocephalus borealis lays its eggs on honeybees and the parasites growing inside the bees cause them to behave erratically like going out of hives at nighttime instead of daytime, congregating near lights and moving slowly in circles. The bee eventually dies and the fly larvae come out between the insect's head and abdomen.

Hafernik accidentally discovered that parasites are causing the zombie behavior after seeing fly pupae inside a vial where he placed bees collected from outside a light fixture at the university. He intended to feed the bees to a praying mantis but forgot about the vial for a week or so after leaving it in his drawer.

Hafernik and his students further investigated the phenomenon last year and confirmed that parasites are indeed killing the bees.

Andrew Core, the lead author of the study, described the behavior of infected bees in laboratory experiments. The insects were sitting, curling, stretching their legs, moving slowly without direction and falling like they were zombies. The scientists also learned that bees that leave their hives at night were most likely to be infected by the fly and when they are infected, they abandon their hives to congregate near lights.

Hafernik and his team will next investigate where the fly infects the honeybees and whether or not uninfected bees drive out the infected ones from hives. The research will involve attaching tiny radio tags on bees and video monitoring them.

"We assume it's while the bees are out foraging, because we don't see the flies hanging around the bee hives. But it's still a bit of a black hole in terms of where it's actually happening," said Hafernik, according to AFP.

The scientist hopes to find a way to prevent the infection of the bees and prevent failure of crops that depend on the insects for pollination.