Over four billion years ago, when Earth was turbulent and new, a strange spark of life grew into existence. We're not entirely sure how it happened, but evidence suggests it was deep under the sea, far below the reach of the Sun's rays.

If we can figure out how that spark formed, it could help in the quest of finding life on alien worlds. Now, NASA astrobiologists have recreated the undersea conditions that could have led to the spark.

One of the hypotheses about origins of life involves deep-sea features called hydrothermal vents - cracks in the ocean floor, often associated with volcanic activity, where heat escapes from deep inside Earth.

In Earth's early days, when the planet was bathed in deadly ultraviolet rays from the Sun, life could have emerged deep in the ocean where those rays couldn't penetrate. Around hydrothermal vents, creatures don't need photosynthesis - the process that has become vital for most living things on Earth.

Instead, down there they rely on chemosynthesis. The bacteria clustering around the vent harness chemical energy, such as the reaction between hydrogen sulphide from the vent and oxygen from the seawater around it, to produce sugar molecules - food.

Once bacteria exist, other animals can feed on them and the nutrients they produce, and thus an entire food chain can thrive in the darkness.

And that's exciting because NASA researchers have reason to think some of the Solar System ice moons, such as Jupiter's Europa and Saturn's Enceladus, might be harbouring hydrothermal vents in the liquid oceans under their frozen crusts.

To investigate the conditions more closely, astrobiologist Laurie Barge and her team built miniature seafloors at NASA's Jet Propulsion Laboratory, filling beakers with mixtures that mimic the conditions of the primordial seas, based on the fossil record.

These, they hoped, would act as nurseries to grow amino acids, the building blocks from which proteins form.

"Understanding how far you can go with just organics and minerals before you have an actual cell is really important for understanding what types of environments life could emerge from," Barge said.

"Also, investigating how things like the atmosphere, the ocean and the minerals in the vents all impact this can help you understand how likely this is to have occurred on another planet."

The mixtures were made from water, minerals, and pyruvate and ammonia - two molecules that can form under hydrothermal vent conditions, and are vital to the formation of amino acids.

The team removed oxygen from the water to mimic primordial Earth's anoxic oceans, adjusted the pH to reproduce the alkalinity, and added "green rust" - the iron hydroxide that was so abundant during Earth's early years. Then, they heated it all to 70 degrees Celsius (158 degrees Fahrenheit), just like the water around a vent.

When they injected small amounts of oxygen into this water, the amino acid alanine formed. It also produced the alpha hydroxy acid lactate, which is a byproduct of amino acid reactions, but could also combine into complex organic molecules to give rise to life.

"We've shown that in geological conditions similar to early Earth, and maybe to other planets, we can form amino acids and alpha hydroxy acids from a simple reaction under mild conditions that would have existed on the seafloor," Barge said.

The team has been working on this line of enquiry for nine years, trying to figure out how much energy hydrothermal vents can produce, and what ingredients can be found around them. But this is the first time they've observed an organic reaction take place under hydrothermal vent conditions.

NASA has also been studying actual hydrothermal vents underneath the ocean, sampling the waters around them and trying to build a more complete picture of what those environments are like.

If there's life in the Solar System that isn't on Earth, the icy moons we mentioned earlier - and their hypothetical hydrothermal vents - are looking more and more like the place to look. In fact, just last year we found complex complex organic molecules in the plumes of salty water shooting out of Enceladus.

"We don't have concrete evidence of life elsewhere yet," Barge said. "But understanding the conditions that are required for life's origin can help narrow down the places that we think life could exist."

NASA is considering missions to both Europa and Enceladus, so watch this space.

The team's research has been published in the journal PNAS.