For several decades now, biologists have been puzzling over sex. In some ways, it seems like a huge waste of effort.

Sexual reproduction requires splitting a species into two sexes, only one of which will be able to produce offspring. There are some species of animals that do without males; the females simply trigger their eggs to develop into embryos without any need for sperm. All the offspring of an asexual animal can produce offspring of their own, instead of just half. So it would make sense that genes that gave rise to asexual reproduction would win out in the evolutionary race.

Clearly that hasn’t happened. The world is rife with sex. Animals do it. Plants do it. Even mushrooms do it. So evolutionary biologists have carried out a number of studies to get an answer to the question, “Why sex?”

In 2009, I wrote an essay for Science about this research. If I had been writing that essay today, I’d have focused some attention on an elegant experiment on the sex life of a humble worm. It gives a big boost to the long-floated idea that evolution favors sex because it lets hosts fight better against parasites.

Allow me to explain by self-plagiarizing:

In the 1970s, several researchers built mathematical models of how parasites influenced the evolution of their hosts and vice versa. Their research suggested that both partners go through cycles of boom and bust. Natural selection favors parasites that can infect the most common strain of host. But as they kill off those hosts, another host strain rises to dominate the population. Then a new parasite strain better adapted to the new host strain begins to thrive, leaving the old parasite strain in the dust.

This model of host-parasite coevolution came to be known as the Red Queen hypothesis, after the Red Queen in Lewis Carroll’s book Through the Looking Glass, who takes Alice on a run that never seems to go anywhere. “Now here, you see, it takes all the running you can do to keep in the same place,” the Red Queen explains.

The Red Queen conundrum, some researchers have argued, may give an evolutionary edge to sex. Asexual strains can never beat out sexual strains, because whenever they get too successful, parasites build up and devastate the strain. Sexual organisms, meanwhile, can avoid these dramatic booms and busts because they can shuffle their genes into new combinations that are harder for parasites to adapt to.

Red Queen models for sexual reproduction are very elegant and compelling. But testing them in nature is fiendishly hard, because biologists need asexual and sexual organisms that share the same environment and parasites.

Scientists have found some mixed populations in the wild where they’ve made some important discoveries. But it’s also possible to test the Red Queen in laboratories. It’s not easy, because scientists need to bring together a host that can reproduce sexually and asexually with a parasite, and then they both have to be able to evolve in response to each other. But that’s what a team of scientists at Indiana University managed to do recently.

As they describe in a paper published today in Science, they reared populations of a tiny worm called Caenorhabditis elegans. C. elegans are born either as males or hermaphrodites. A hermaphrodite worm can fertilize its eggs with its own sperm, or it can seek out a male. The worms typically don’t have a lot of sex, and the rate at which they do is partly programmed into their genes. The Indiana team of scientists were able to engineer the worms so that they could have no sex at all, or could only reproduce through sex.

For their parasite, they chose a species of soil bacteria called Serratia marcescens. Soil bacteria are the regular prey of C. elegans, but if they slurp up S. marcescens by accident, they get sick and can die in under 24 hours. Previous studies had shown that the worm can evolve stronger resistance to the germ, and the germ can evolve to be deadlier for the worm. So the Indiana researchers set about combining their evolution into one big experiment.

They mixed together worms and germs in several different arrangements and let them duke it out for 30 worm generations. In each trial, the worms were either sexual or asexual. In some trials, the bacteria coexisted with the worms for the whole experiment, so that they could evolve along with the worms. In other trials, the worms were repeatedly presented with the same, fixed strain of S. marcescens. In other words, the bacteria could not evolve. And in control experiments, the worms enjoyed a Serratia-free life.

As this graph to the left shows, the asexual worms that faced co-evolving germs were annihilated in just 20 generations. (“Obligate selfing” means no sex.) If the germs couldn’t evolve, however, the asexual worms did fine. The scientists also tested the bacteria for deadliness after the experiments were over. They found that the bacteria that were allowed to co-evolve with the asexual became much deadlier. The co-evolving sexual worms, on the other hand, suffered far lower mortality rates from their germs.

In another experiment, the scientists started out with ordinary worms, which only had sex about 20 percent of the time they reproduced. Again, they exposed the worms to unchanging bacteria, or co-evolving ones, or no bacteria at all. The graph to the right says it all. The worms not exposed to the bacteria went on having infrequent sex. The worms that could evolve but faced fixed bacteria had more sex for a while, but eventually crashed back down to their original levels. The coevolving worms, on the other hand, became mostly sexual.

In each of these results, the Red Queen has left her mark. Far from being a waste of time, sex may save organisms from a swift oblivion.

[Images: turtles via Creative Commons from man of mud/Flickr. C. elegans via Creative Commons licence from AJ Cann/Flickr.]

(Update: paper link fixed)