Male fruit flies who are deprived of sex may turn to alcohol as a source of pleasure. That’s the upshot of a study published Thursday afternoon in the magazine Science.

Researchers at the University of California, San Francisco, set out to explore the way the brain’s reward system may be affected by a social interaction (sex) and how that relationship might affect the seeking of pleasure by other means (alcohol).

In this undated image provided by the University of California San Francisco, a male fruit fly drinks alcohol-laced food from from a tube. In the Friday, March 16, 2012 issue of the journal Science, researchers say sexually deprived male fruit flies are driven to excessive alcohol consumption, drinking far more than comparable, sexually satisfied male flies. (G. Ophir/AP)

So they placed 24 male fruit flies (technically Drosophila melanogaster) in containers containing female fruit flies, some of them virgins, some of them already mated. Virgin female fruit flies are receptive to male sexual advances -- but as the couple completes the act, the male injects, along with sperm, a substance that temporarily makes the females unreceptive to males, the study explains.

When a male fruit fly tries to mate with a non-virgin female fruit fly, the female (somewhat dramatically, as this video illustrates) rejects him. The males in this study were subjected to repeated rejection over the course of four days.

Meanwhile, fellow male fruit flies were having the time of their lives: They were placed in vials with virgin females who were open to their advances.

All the males in both groups were then allowed to choose between two food options, plain food mash and the same food laced with alcohol.

The sexually satisfied males had no use for the alcohol-laced feed. But the sexually deprived males overwhelming selected the boozy brew, drinking four times as much as their sexually satisfied brethren.

Separate experiments suggested that it was the deprivation -- not the rejection, per se, or the differing olfactory stimuli they got from the virgin versus non-virgin females, for instance -- that spurred the males to seek alcohol.

So why should we care about the sex lives of fruit flies? The study explains that the sexually deprived flies had half the amount of a substance called neuropeptide F (NPF) in their brains than the sexually satisfied males had. In turn, those low levels of NPF may have driven the rejected males to seek the pleasure of alcohol. Mammals, including humans, have a similar (but not identical) substance in their brains called neuropeptide Y, and the study’s authors suggest their fruit-fly findings might shed light on mechanisms behind human substance abuse and addiction.