Fruit flies will actually seek out alcohol to kill off blood-borne parasitic wasps living within them.

Fruit flies can apparently out-drink Frank the Tank and not get sick from alcohol poisoning. Now researchers have found this fraternity-party ability may save flies from a gory death.

The results showed that drunk fruit-fly larvae turned the tables by killing wasp parasites in their bloodstream, essentially causing the parasite's organs to drain from its anus, the researchers found.

Fruit fly larvae feed on the yeast and other fungi from rotting, or fermenting, fruit; during their snacking, the flies are bound to ingest the boozy byproducts of the fungi's fermentation — they are even able to use it as a food source and thrive on food with up to 4 percent alcohol.

Higher alcohol levels can be toxic to the fruit flies, study researcher Todd Schlenke, an assistant professor at Emory University, told LiveScience. "If the alcohol level gets too high, they can't break it down fast enough." The flies in the study only reached about 0.02 percent blood alcohol levels, they would have to drink four times that to reach the blood alcohol level considered illegal for driving.

This idyllic existence on a booze-soaked piece of fruit is often disrupted by parasites, including wasps that lay their larvae in the larva of the fruit fly. If untreated, the tiny wasps eat the flies from the inside out, bursting from the flies bloodstream fully formed. The researchers have discovered, though, that the flies use their naturally high tolerance to alcohol to kill off their blood bugs.

In the study, when the wasps tried to lay their eggs in fly larvae on food containing 6 percent alcohol, they were less likely to lay eggs, "presumably because they are feeling bad," Schlenke said. The eggs they did lay were less likely to survive.

"If you dissect open a fly that was fed alcohol food, the wasps were obviously dead and in a lot of cases the internal organs in the wasp larvae had fallen out the wasp's anus," Schlenke said. "They were turned inside out." Now that's a bad hangover.

When infected larvae are placed in a dish with both alcoholic and non-alcoholic food, they even make a break for the alcohol to reduce their parasite load: After 24 hours, 80 percent of the infected fly larvae were hanging out on the alcohol side of the dish, but only 30 percent of the uninfected larvae were.

"We gave them a choice between food with alcohol and food without alcohol, and the infected flies overwhelmingly went to consume the toxic alcohol food," Schlenke said. It's as if the flies ask themselves, "Do I want to suffer from toxic levels of alcohol or do I want to die from this wasp?"

The study was published today (Feb. 16) in the journal Current Biology.

You can follow LiveScience staff writer Jennifer Welsh on Twitter @microbelover. Follow LiveScience for the latest in science news and discoveries on Twitter @livescience and on Facebook.