Once upon a time, Earth was barren. Everything changed when, somehow, out of the chemistry available early in our planet's history, something started squirming – processing available matter to survive, to breed, to thrive.

What that something was, and when it first squirmed, have been burning questions that have puzzled humanity probably for as long as we've been able to ask "what am I?"

Now, a new study has found some answers – and life emerged surprisingly early.

By studying the genomes of organisms that are alive today, scientists have determined that the last universal common ancestor (LUCA), the first organism that spawned all the life that exists today on Earth, emerged as early as 4.2 billion years ago.

Earth, for context, is around 4.5 billion years old. That means life first emerged when the planet was still practically a newborn.

"We did not expect LUCA to be so old, within just hundreds of millions of years of Earth formation," says evolutionary biologist Sandra Álvarez-Carretero of the University of Bristol in the UK. "However, our results fit with modern views on the habitability of early Earth."

Back when it was new, Earth was a very different place, with an atmosphere that we would find extremely toxic today. Oxygen, in the amount current life seems to need, didn't emerge until relatively late in the planet's evolutionary history, only as early as around 3 billion years ago.

But life emerged prior to that; we have fossils of microbes from 3.48 billion years ago. And scientists think that conditions on Earth may have been stable enough to support life from around 4.3 billion years ago.

But our planet is subject to erosional, geological, and organic processes that make evidence of that life, from that time, almost impossible to find.

So, led by phylogeneticist Edmund Moody of the University of Bristol, a team of scientists went looking somewhere else: in genomes from living organisms, and the fossil record.

Their study is based on something called a molecular clock. Basically, we can estimate the rate at which mutations occur, and count the number to determine how much time has passed since the organisms in question diverged from common ancestors.

All organisms, from the humblest microbe to the mightiest fungus, have some things in common. There's a universal genetic code. The way we make proteins is the same. There's an almost universal set of 20 amino acids that are all oriented the same way. And all living organisms use adenosine triphosphate (ATP) as a source of energy in their cells.

Moody and his colleagues worked out, based on these similarities and differences, how long it has been since LUCA's successors started to diverge. And, using complex evolutionary modeling, they were able to learn more about LUCA itself – what it was, and how it survived on an Earth so very inhospitable to its descendants.

LUCA, they found, was probably very similar to a prokaryote, a single-celled organism that doesn't have a nucleus. It was obviously not reliant on oxygen, since there would have been little oxygen available; that's not unexpected for a microbe. As such, its metabolic processes probably produced acetate.

But there was something else interesting. LUCA appears not to have been alone.

"Our study showed that LUCA was a complex organism, not too different from modern prokaryotes," says phylogenomicist Davide Pisani of the University of Bristol.

"But what is really interesting is that it's clear it possessed an early immune system, showing that even by 4.2 billion years ago, our ancestor was engaging in an arms race with viruses."

Because its metabolic processes would have produced waste products that could be used by other lifeforms, they could have emerged not long after LUCA did.

This implies that it takes relatively little time for a full ecosystem to emerge in the evolutionary history of a planet – a finding that has implications far beyond our own little pale blue dot.

"Our work draws together data and methods from multiple disciplines, revealing insights into early Earth and life that could not be achieved by any one discipline alone," explains paleobiologist Philip Donoghue of the University of Bristol.

"It also demonstrates just how quickly an ecosystem was established on early Earth. This suggests that life may be flourishing on Earth-like biospheres elsewhere in the Universe."

The research has been published in Nature Ecology & Evolution.