Scott Sandford likes to describe life on Earth in terms of Legos.

Like any ambitious project, life requires many particular parts: blue bricks, red bricks, rectangular bricks with six pegs, those crazy-shaped ones that spin.

But unlike Lego bricks, which can be purchased at their own dedicated online marketplace (who knew?), the source of life’s building blocks remains something of a mystery. Years of experimenting with the conditions that existed on Earth in its earliest days have failed to produce some of the complex molecules that are necessary to all organisms — suggesting those molecules arrived from elsewhere.

That means that the key ingredients for life could be swirling all around in space. For all we know, they may even have landed on other planets, too.

This vision of life’s extraterrestrial origins got a boost Thursday, when scientists reported that they’d managed to produce ribose — a sugar that probably formed the backbone of an early version of life — and other essential molecules by blasting an artificial chunk of interstellar ice with ultraviolet light.

The experiment was a model of how those building blocks could have formed in the early solar system, which was swirling with grains of ice and dust and awash in radiation. Eventually, that ribose-infused ice-dust may have coalesced into comets that then crash-landed on Earth, enriching the primordial soup that would eventually give rise to living things.

“If you think of all these little molecules we’re making as Lego blocks, and life as a kind of very complex, organized Lego castle,” Sandford told the New Scientist, “the fact that Lego blocks are falling out of the sky can’t be a bad thing.”

Sandford, who studies the formation of organic molecules in space for the NASA Ames Research Center in California, was not involved in the most recent study, which was published in the journal Science. But he said it bolsters the kind of work he and other astrobiologists are doing, providing “another example of how the universe seems to be hardwired to produce a lot of the kinds of compounds you would like to be around if you want to get life going.”

Ribose has never before been detected on a real comet or an artificial one made in the lab. The fact that the researchers were able to find it is especially exciting, because the simple sugar plays a starring role in the story of life’s origins.

Before humans, before the dinosaurs, before trilobites and protozoa, even before the earliest, meager packets of DNA and proteins to ever be called a “cell,” scientists believe that the Earth was an “RNA world.”

According to this theory (which won the Nobel Prize in 1989) the first things to replicate themselves were strands of RNA — a cousin and probable predecessor of the much more famous double helix molecule on display in every biology classroom. Unlike DNA, which acts as a great instruction manual for life processes but requires proteins to actually carry them out, RNA can reproduce all on its own. And even though it’s less stable than DNA, it is also simpler. These qualities make RNA a good candidate for modern life’s precursor.

The idea that RNA was the first to arise from the primordial soup was the “molecular biologist’s dream,” scientists Gerald Joyce and Leslie Orgel wrote, according to Scientific American. But the implausibility of that happening was also “the prebiotic chemist’s nightmare.” After all, RNA also needs to come from somewhere, and its ingredients — including its sugar backbone of ribose (the “R” in RNA) — seemed impossible to manufacture from simpler materials.

The Science study, which formed a huge variety of sugar molecules by radiating a frozen blend of water, methanol and ammonia, shows that it can be done. Whether that really is how it happened remains to be seen; as University of Stirling scientist Christian Schroeder noted in the Conversation, researchers still need to demonstrate that the process occurs on real comets, not just man-made ones.

But other essential life ingredients, such as amino acids and the molecules that form cell membranes, have already been found in samples from meteorites and experiments in labs. So have simple sugars like glycolaldehyde, which can combine with other molecules to produce ribose.

Of course, “just because now you have all the molecules doesn’t mean you have life,” as lead author Cornelia Meinert, an astrochemist at the University of Nice Sophia Antipolis, told the New Scientist.

But it is a pretty good starting point. What’s more, it hints that these biological building blocks may have wound up on planets other than our own.

“If all these molecules that are necessary for life are everywhere out in space,” Andrew Mattioda, an astrochemist at NASA Ames Research Center, told the Los Angeles Times, “the case gets a lot better that you’ll find life outside of Earth.”