In a laboratory set up to simulate conditions in space, NASA scientists were able to produce a key component of RNA, which is found in the genetic makeup of all living organisms on Earth.

The experiment is part of a larger initiative to try to understand how the building blocks for life might have formed in space.

"We know they exist somehow in space, but we don't know how or where they form," said Stefanie Milam, an astrochemist at NASA's Ames Research Center in Moffett Field, Calif.

The team started with a sample of ice laced with pyrimidine, a ring-shaped molecule made of carbon and nitrogen. Pyrimidine is the basis of three nucleic acids, including uracil, which is found in ribonucleic acid, or RNA.

The ice sample was kept in space-like conditions, including extreme cold — about minus-340 degrees Fahrenheit — high radiation and a near vacuum.

The sample was then exposed to ultraviolet radiation, similar to what might happen when a dense molecular cloud is pierced by a cosmic ray or a beam of light from a passing star.

As the ice warmed, scientists found new materials formed, including uracil.

The scientists, who published their work in Astrobiology, are now working to see if they can get other nucleobases to form in the lab.

"We're trying to push the chemistry from these very simple ices to see if we can get to the complexity that we actually see in a meteorite or the complex biochemistry that we see on Earth," Milam told Discovery News.

It's a long leap from understanding how complex organic molecules form in space to understanding how all the pieces came together for life to arise on Earth, and possibly elsewhere in the universe.

"Nature seems to be very good at making Legos," said Scott Sandford, a NASA astrophysicist who studies organic materials in space. "The next question is: Is nature good at putting together Legos to make castles and bridges?"

"What we are showing is that the universe follows rules in how things work. One of those things we seem to be demonstrating is that the universe has been hard-wired to have processes that make these molecules," Sandford said.

"The universe isn't a very efficient chemist, but it has a lot of beakers and a lot of time," he added.