A male fruit fly under red lightAvi Jacob, Bar-Ilan University Microscopy Unit

Humans have spent a lot of time figuring out ways to get animals to ejaculate. They have fashioned artificial vaginas, inserted electric probes, and donned helmets that encourage birds to hump their heads. Now, Shir Zer-Krispil, from Bar-Ilan University in Israel, has developed perhaps the greatest technique of all: She genetically engineered flies to automatically ejaculate whenever they walk under red light.

The male insects have specific abdominal neurons that trigger the release of sperm by producing a chemical called corazonin (so named because it also makes insect hearts beat). Usually, corazonin-making neurons only fire after a complicated courtship ritual that involves chasing, stroking, singing, and eventually mating. But Zer-Krispil dispensed with all that lead-up by putting those neurons under the control of a red-sensitive protein.

Thirty seconds after the engineered males walk into a red-lit chamber, their abdomens curl up and they ejaculate. And then, they do it again. It happens seven times a minute, for up to three minutes. The flies had the option of walking into an unlit part of their chamber, but once they entered the red-light district, they tended to stay there.

Why red? First, it passes through living tissues easily, so even an overhead lamp can trigger neurons nestled deep within a fly’s body. Second, flies can’t see red, so it’s clear that their movements aren’t due to any visual attraction. Third ... it’s fitting? “We definitely thought about that,” says Galit Shohat-Ophir, who led the work.

Through this experiment, and several others, the team has shown that sex is a pleasurable experience for flies—or specifically, that ejaculation is for the males. It releases the same chemicals that are linked to rewarding experiences in mammals. It creates associations that make other stimuli occurring at the same time—like a smell—desirable in their own right. It even substitutes for other rewards: Male flies that have recently ejaculated are less enticed by alcohol.

This might seem obvious, but the study of animal sex tends to be curiously sanitized and anhedonic. The focus falls on the mechanics of the act and its evolutionary benefits, while subjective experiences are ignored for fear of anthropomorphism. It is often said that humans are among the only animals that have sex “for pleasure”—an elite club that might grudgingly include bonobos and dolphins, but little else. And even if the idea that animals are enjoying themselves is not explicitly denied, it’s often just plain ignored. Animal sex becomes all business, and no ... well, you know.

That seems unlikely. Many animals have sex at times when they’re infertile or in ways that can’t possibly lead to reproduction. Several species practice oral sex, including bonobos (of course), brown bears (in captivity), and several kinds of bat (the music choice in this video is something). A lot of them masturbate. “I definitely think animals have pleasure,” says Shohat-Ophir. “It’s hard if you define pleasure from a human point of view, but it [comes down to] very basic machinery that even simpler animals have.”

For example, when flies mate, their brains accumulate a substance called neuropeptide F, which acts as a “molecular signature of rewarding experiences,” Shohat-Ophir says. Even without mating, a burst of corazonin, stimulated by red light, can produce the same burst of NPF.

“Think of the reward system as a reservoir and NPF as a float that measures the amount within it,” says Shohat-Ophir. When levels are low, the insects are more motivated to top up their reservoirs by seeking out rewarding experiences. For instance, in an earlier study, her team found that sex-deprived flies will more readily turn to alcohol. (No barfly jokes, please; since these flies eat fermented fruit, alcohol is a natural part of their diet.) And in the team’s latest experiments, they found that a burst of corazonin can quell that desire. After ejaculating, males will choose a sober meal over a boozy one.

“For the first time, we see that neurons outside the brain can induce feelings of reward, which change the internal state of the animal, and changes their perception of a drug,” says Shohat-Ophir.

This isn’t just about flies. Mammals have a closely related chemical called neuropeptide Y that could similarly act as a mental currency of reward. In rodents, NPY is depleted by stressful events and leads to cravings for alcohol. Other scientists are already looking to see if NPY levels are linked to alcoholism or drug addiction.

“Neuropeptides are some of the most complex and least studied brain chemicals,” says Karla Kaun, from Brown University. “They show striking similarity in how they regulate behavioral states in many species, whether or not they have a spine.”

That’s useful: It might be easier to examine how they work in flies than in rodents because scientists can manipulate specific neurons with greater precision—as the red-light experiments show. By studying flies, Shohat-Ophir hopes to learn more about human problems like addiction.

Of course, her team only has half the picture so far, because they’ve only studied male flies. That’s par for the course. Even among humans, the study and understanding of women’s pleasure has lagged significantly behind that of men’s. (As a friend of mine said to me after I told her about the flies: “We are going to study male fruit-fly pleasure before we study human women.”)

Shohat-Ophir has already done some preliminary studies on what the female flies feel, and she’ll publish those results soon. In the meantime, she tells me about a study, published 17 years ago by Mexican researchers. It found that for male rats, any sexual interaction that ends in actual mating is rewarding. For females, “it’s pleasurable only when the female chooses to mate,” Shohat-Ophir says.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.