Comets and asteroids have been blamed for a lot of things before. Shaping Earth. Jumpstarting life. Wiping out dinosaurs. Even possibly altering human evolution.

But never sex.

Roughly 1 billion years after the first organisms romped in the hay, the origin of sex remains one of biology's greatest mysteries. Scientists can't say exactly why we do it, or what triggered those initial terrestrial flirtations. Before sex, life seemed to manage fine by employing asexual reproduction -- the cloning of offspring without the help of a partner.

Now a new study out of Caltech and NASA's Jet Propulsion Laboratory has used digital organisms to simulate life before sex and yielded a possible mechanism for instigating Earth's first courtship.

Intimacy never sounded so stressful.

Comet or asteroid impacts could have stressed asexual organisms enough to send them down the path of sexual reproduction after forcing a flurry of genetic mutations, the study shows. Heavy doses of radiation might also have done the trick.

While these potential catalysts for mutations are highly speculative, researchers Claus Wilke and Chris Adami announced Monday night that they have determined with certainty one possible way that organisms could have managed such a chaotic environment to their advantage in opening the original door to sexual liberation.

The key to this mutation management, Adami told SPACE.com, is the discovery that when things get rough, a population of organisms adapts to handling a few mutations, while also ensuring that many mutations will be self-destructive.

"Mutations can and do still occur," he said, "but they lead to dead organisms and therefore do not affect the future."

Before sex

Sex never should have happened, biologists often say.

Though the ultimate act of affection has been around longer than anyone can remember, it wasn't always so. On the early Earth, all organisms reproduced asexually.

Any gardener is familiar with how asexual production works. Underground runners can create multiple clones (not to mention destroy a good lawn). Potatoes give up an eye to create another potato. Bulbs divide. Cacti, exhibiting no creativity in this area but managing to foster progeny nonetheless, simply let pieces of themselves fall to the ground and hope for the best.

Some animals get in on the asexual act, too. Sponges and sea anemones produce little ones via buds. Flatworms, if cut in two, grow a new head on one of their severed ends and a new tail on the other.

These are handy and powerful ways to leave a legacy.

For one thing, there's no need for a partner -- no butting of horns, no beating of the chest, no late nights at the bar. Reproduction is virtually guaranteed. Also, when desirable traits evolve, they are not quickly diluted by evolution. Your offspring are just like you. Exact clones.

Sex, on the other hand, combines myriad mutations with each pairing of genes, and the process "can wash out the good and accumulate the bad," Adami says. Just ask any failed child of successful parents.

The age of sex

Despite all these advantages for asexual reproduction, somewhere along the evolutionary line sex became all the rage.

Thankfully so, for we humans owe our existence to that first melding of the genes. Asexual reproduction provides for a plodding style of evolution, relying solely on accidental mutations to effect change. It's an evolutionary slow train that might never have gotten around to delivering humans. It can also limit a population's ability to survive severe environmental change.

Sex, on the other hand, allows plants and animals to evolve quickly, because the gene pool mixes and the fitter survive.

Yet as any parent knows, sex is a rather inefficient way to make babies. Biologically speaking, the man spends nine months doing absolutely nothing productive while the woman does all the work (in some households, this problem is known to persist far longer).

So in an evolutionary sense, why would sex ever have become so popular? More to the point, why would any asexual organism have bothered to try out sex in the first place?

We're all mutants

Researchers have long known that mutations rewrite portions of an organism's genetic code. Some mutations can be good, in fact helping a species to thrive at the expense of others. But the effect can sometimes be deadly. Since sex involves two parents, there is twice the number of mutations to muck up the genetic scripts.

Wilke and Adami created two different simple, computerized life forms that "share many characteristics with bacteria," then placed them in a stressful environment where the rate of mutations was high. By studying digital creatures, they were able to zip through many generations in a short time.

The scientists found a natural throttle to the number of mutations a population of asexual bacteria can handle. The throttle can be thought of as a conservation law. The law dictates that a population capable of adapting to the harmful effects of a few mutations cannot possibly handle a bunch of mutations. Past a critical limit, the accumulated mutations make gibberish out of the genetic code and the organisms die.

Conversely, the new law also shows that a population which can handle many mutations would be highly vulnerable to the first few. "In fact there are such organisms [today]," Adami said. "Sex could, however, never evolve" in such a population. The offspring would be too vulnerable to the initial flurry of mutations that would be written into its code, combined from two organisms.

The birth of sex

Now imagine simple organisms long ago that just happened to share genetic information in a loose and uncoordinated fashion. Such sharing goes on today without leading to reproduction.

If such a population of organisms were suddenly faced with the stress of high mutation rates, it would over the course of many generations develop a capacity to handle a few mutations. But by the new law, numerous mutations would be intolerable.

The effect of all this, Adami says, is that bad mutations would be weeded out of the population.

When multiple mutations are intolerable, bad mutations cannot accumulate, because each successive bad mutation has an increasingly deadly effect on an already weakened organism. Useful mutations, however, do not harm a population in these conditions, Adami said.

Put another way: "When multiple mutations are intolerable, bad mutations cannot accumulate, while the good ones still can."

This could pave the way for the benefits of sex to be enjoyed.

A theoretical door would be open to sexual freedom, and if a pair of organisms mutated enough to go behind that door, then their newfound ability to share beneficial mutations, via sex, would give them a Darwinian advantage over their asexual cousins in the highly stressful environment.

"You can imagine a path that leads from the uncorrelated exchange of genetic material to the completely orchestrated recombination process," he says, referring to the birth of sex.

Any number of catastrophes might have fueled a changed environment and a rate of high mutations, Adami explains. A cosmic impact could have altered Earth's atmosphere for millions of years, exposing the planet to high doses of radiation. Increased volcanic activity is another possible source.

But Adami stressed that these possibilities, while useful to consider, were not a part of the study and so remain highly speculative.

Not actually living organisms

Clifford W. Zeyl, who studies evolutionary genetics at Wake Forest University, called the work surprising and interesting, but added a further caution:

"Since the idea came from a study of digital organisms and not from any historical evidence that such stresses actually acted on living organisms, or that they would have had the effect of selecting for sex, I think it's highly speculative," Zeyl said.

Adami is confident that the computer experiment renders an accurate picture, and he suspects that if such a test could be carried out on real organisms (it can't, because it would take too long) similar results might be found.

"The digital organisms actually live in the memory of the computer, so all we do is set up the experiment and then observe," he said. He added that some biologists are skeptical of any research carried out using digital organisms, but says there is "no reason whatsoever" to think that the findings would not apply in real-life situations.

The study results are published in the July 22 issue of the Royal Society journal Proceedings: Biological Sciences B.