One day, Earth will probably be hit by an asteroid or comet large enough to wipe out most living creatures. It is not likely to be soon - but such events do happen. The comet that reputedly killed off the dinosaurs and many other species 65 million years ago left a crater 180 kilometres in diameter and plunged the whole world into years of cold and darkness.
But even events of this magnitude pale into insignificance compared with the ones that happened back when Earth was newly formed. Until about 3.8 billion years ago, vast hunks of rock - many measuring 100 kilometres or more across - frequently crashed into the planet, typically at speeds of about 30 kilometres per second. The effects of such a collision would be awesome. It would excavate a crater larger than the British Isles. The blast would strip away most of the atmosphere, replacing it with vaporised rock from the impacting object. This incandescent material would swathe the planet, creating a global furnace with a temperature of 3,000(C. In the intense heat the oceans would boil away, and the exposed land would be thoroughly sterilised. A lethal pulse of heat would travel as much as a kilometre into the ground.
Earth would be a pretty inhospitable place for life after such a cataclysm. Yet, paradoxically, scientists are beginning to suspect that the life forms from which we are descended survived just such conditions. Fossil microbes are known that date back 3.6 billion years, while hints of life have been found in rocks as old as 3.85 billion years.
This has led to some fascinating speculation. These organisms might have survived the cataclysms by cowering deep within the earth. Or they might have been thrown into space inside fragments of rock, where they could safely wait for an opportunity to put down roots again. And once in space, they could even have found refuge on another planet, and then returned to Earth cocooned in more rocks. Stranger still, this could all just as easily have happened to Mars: and if it did, all living things on Earth's surface may have come originally from the planet next door.
Everybody agrees that the sort of life now found on Earth could not have originated without two basic raw materials: liquid water and a supply of organic substances - carbon-based molecules that typically include hydrogen, oxygen and perhaps nitrogen. So the first question is: where did these raw materials come from? The answer, many now believe, is that they probably did not originate on Earth.
Astronomers have built up a blow-by-blow account of how the Solar System formed. First, a collapsing cloud of hydrogen turned into a glowing blob - the proto-Sun - surrounded by a swirling disc of gas and dust. From this, the planets condensed. Substances that can survive high temperatures without melting - iron, silicon and the like - solidified relatively close to the Sun and clumped together to make the innermost planets Mercury, Venus, Earth and Mars. More volatile substances such as water and hydrocarbons condensed much farther out. There, sticky snowflakes snowballed to form the cores of the gas giants, including Jupiter and Saturn.
During this initial period of aggregation, collisions between partly formed planets and hurtling debris were common. At some point a Marssized body smashed into Earth, stripping away its mantle before ploughing on to become Earth's core. The material thrown out by the crash eventually came together to form the Moon. This cataclysmic encounter would have baked Earth bone dry and driven off any trace of organic substances that might have survived the fierce heat of the solar nebula.
While all this was happening, about 4.5 billion years ago, Earth was scarcely a congenial place for life. And the violence didn't stop then. Over the following 700 million years, gravitational perturbations from the newly formed giant planets disturbed many of the large comets and asteroids that were milling around the periphery of the Solar System, and sent some of them plunging our way. Most of these interlopers fell into the Sun, broke up or were flung back out again. But many smashed into the planets.
From the point of view of the prospects of life on a planet, a collision with a comet has both pros and cons. Comets are packed full of ice and life-encouraging organic substances. On the other hand, the impact itself releases a huge amount of energy, which may blast this material - or anything similar already on the planet - into space, thinning the atmosphere and depleting the oceans. Whether a planet is a net winner or loser in these encounters depends on circumstances. As a rule, the bigger the planet the more likely it is to gain rather than lose material. Mars was a borderline case. It did acquire moderate amounts of water, and it once had a thick atmosphere too, but its gravity was not strong enough to hold onto it, and the Red Planet is now an arid desert.
Earth did well out of the bombardment, and emerged with plentiful water and air. It has been estimated by Chris Chyba, now at the University of Arizona, that enough comets hit Earth to supply the world's oceans many times over. Our planet also received a veneer of organic substances. Exactly which chemical process transformed a mixture of lifeless substances into the first living thing has yet to be established. But it is clear that neither liquid water nor a supply of organic molecules - the two key ingredients - existed on the newly formed Earth. So the biosphere must have been constructed, at least in part, from the raw material that comets and asteroids brought to Earth more than 4 billion years ago.
The craters on the Moon suggest that the cosmic barrage was especially intense between 4 billion and 3.8 billion years ago, after which it gradually abated as the Solar System was swept clean of debris. Towards the end of this period there must have been many huge impacts, and at first sight this would seem to rule out any possibility of life.
Recently, however, some dramatic discoveries have put a new spin on the subject. For one thing, we now know that life on Earth is not restricted to the planet's surface. Micro-organisms have been discovered dwelling happily several kilometres under the ground, existing on a diet of minerals and gases. Similarly, the dark ocean floor is home to many exotic microbial species, and the international Ocean Drilling Program has discovered that the submarine biosphere extends deep into the rock of the seabed itself. Evidently the Earth's crust is teeming with tiny life forms.
This gives a clue to how life on the early Earth could have endured repeated impacts from space debris. Organisms for which the comfort zone extended into the hot crust by a kilometre or more could have survived a major impact event, so long as they were well away from ground level. In effect, the deep strata could have provided shelter against the ferocious bombardment, as long as the organisms could tolerate the naturally high temperatures. Many of today's deepliving microbes would have managed this feat with ease. They thrive near volcanic vents, or in geothermal rocks, in some cases enduring temperatures well above the normal boiling point of water.
Microbiologists have been studying these "hyperthermophiles" in the hope they will cast light on Earth's earliest life forms. It turns out that all the oldest and deepest branches of the tree of life are occupied by heat-loving superbugs. In effect, they are living fossils, having remained largely unchanged for billions of years.
Some scientists now believe that the earliest organisms on Earth were deep-living hyperthermophiles, and that we and the rest of surface life are later adaptations. It is possible that fissures or pores in the rock could have acted as tiny crucibles that concentrated the necessary substances. Life might have started deep in the hot crust of the planet, and ventured up only when it was safe to do so. If this is right, life didn't so much crawl out of the slime as ascend from Hades.
Unfortunately the evolutionary record cannot yet confirm this. It is possible that Earth's first life forms started out on the surface and then colonised the torrid subterranean zone. Come the next big impact, only the microbes that had evolved to live hot and deep survived.
Suppose, as many scientists maintain, that life emerged rapidly from lifeless chemicals once physical conditions were suitable. There were probably gaps of a few million years between really big impacts, during which time life could have got under way, only to be zapped when the next large asteroid plunged home. The early history of life on Earth might then have been an extended series of false starts, as sterilising impacts destroyed successive attempts by primitive organisms to establish themselves. Life as we know it would then be descended from the first microbial colony that just managed to survive the bombardment.
If this theory is right, we may yet find fossilised traces of these earlier organisms. As they would be completely unrelated to life on Earth today, they would, by most definitions, constitute an alien form of life. It is even possible that an isolated colony of these "alien" superbugs survived, and is still lurking in an unexplored niche somewhere, awaiting the prospector's drill.
But there is another even more intriguing possibility. The early bombardment of Earth would have displaced prodigious quantities of rocks into space. So rather than surviving underground, could micro-organisms have escaped destruction by going into space? Jay Melosh of the University of Arizona has shown that several per cent of the ejected material produced by a large impact may be flung into orbit without the rocks being severely heated or shocked. Since we know that Earth rocks provide a congenial home for life, it appears inevitable that some viable microbes will have been sent into space.
Ensconced cosily within an orbiting chunk of rock, shielded from radiation, and freeze-dried by the vacuum of space, a microbial spore could survive virtually indefinitely. And some of the material thrown into Earth orbit would eventually fall back to Earth - not all of it burning up on re-entry. So the planet may have been recolonised from space once the aftermath of a sterilising impact subsided.
It is only a simple extension of this scenario to imagine that a rock from Earth harbouring live organisms might travel to one of our neighbours in the Solar System. During the heavy bombardment there was no lack of cosmic encounters that packed enough punch to achieve this. Transport of such microbes to Mars might have been particularly significant. Although the surface of Mars is too harsh for life today, things were very different in the past. The Mars Global Surveyor, now orbiting the Red Planet, has revealed a landscape deeply etched with dried-up river valleys and embellished by extinct volcanoes. It seems that about 3.6 billion years ago, Mars was warm and wet - not unlike Earth. Life existed on Earth before this time, so terrestrial microbes could have reached Mars when conditions there were quite congenial. This, I believe, makes it virtually certain that there was once life on Mars.
And if Earth organisms colonised Mars, why not the other way round, as well? Indeed, as a cradle for primeval life, Mars offers some distinct advantages over Earth. Being smaller, it suffered fewer impacts. It also cooled more quickly, enabling any hyperthermophiles to burrow deeper and so be better protected from the effects of the bombardment. Most importantly, the surface of Mars may have been hospitable to life more than 4 billion years ago, when our own planet was still a barren cauldron.
Meteorites originating from Mars have been found on Earth, so if life did get going on Mars first, it becomes a distinct possibility that it was transferred to Earth inside such a meteorite. Computer simulations published two years ago by Bret Gladman of Cornell University and his collaborators suggest that 7.5 per cent of Mars ejecta eventually reaches Earth, a third of it within ten million years. This is easily a short enough time for a microbial spore to remain viable; on Earth, some spores have been preserved in salt and amber for much longer.
The theory that Earth was seeded with Martian micro-organisms would explain why life established itself here so early, in the most marginal of circumstances. A steady supply of fecund Martian debris raining down on Earth throughout the bombardment period would have given Martian bugs a good opportunity to colonise Earth as soon as conditions permitted.
Of course, we can also imagine that life started independently on both planets. In this case, any incoming Martian microbes would have found themselves in competition with Earth life. Would one form have destroyed the other, or might they have been similar enough to join forces in a kind of interplanetary symbiosis? Another possibility is that they found separate ecological niches, and continued on a path of peaceful coexistence and parallel evolution. Who knows, exotic Martian microbes may still be lying undetected all around us.
Mars ceased to be a good abode for life when surface conditions there began to deteriorate about 3.6 billion years ago. Volcanism slowed, the atmosphere leaked away, oceans and lakes either evaporated or froze, and the planet turned into the hostile desiccated wasteland that we see today. It seems increasingly likely that Mars is now a totally dead world. So, it would be an ironic twist if life on Earth did originate on Mars. You and I, and all the other life forms we share this planet with could actually be the last Martians.
Paul Davies is a physicist and writer living in Adelaide. His new book, The Fifth Miracle: the Search for the Origin of Life is published by Penguin on September 24th at £18.99 in UK