They discovered that an ice sample containing pyrimidine, when exposed to ultraviolet radiation under space-like conditions, produced the three essential ingredients of life - uracil, cytosine and thymine.
Pyrimidine is a ring-shaped molecule made up of carbon and nitrogen.
It is found in meteorites although scientists still do not know its origin.
It is the central structure for uracil, cytosine and thymine which are all part of a genetic code found in our RNA and DNA.
"We have demonstrated for the first time that we can make uracil, cytosine and thymine non-biologically in a laboratory under conditions found in space," said Michel Nuevo, research scientist at Nasa's Ames Research Centre, Moffett Field, California.
"We are showing that these laboratory processes, which simulate conditions in outer space, can make several fundamental building blocks used by living organisms on Earth," he continued.
Nobody really understands how life got started on Earth.
"Our experiments suggest that once the Earth formed, many of the building blocks of life were likely present from the beginning," added Scott Sandford, space science researcher at Ames.
Since we are simulating universal astrophysical conditions, the same is likely wherever planets are formed, Sandford noted.
Nasa scientists have been simulating the environments found in interstellar space and the outer solar system for years.
In theory, the researchers thought that if molecules of pyrimidine could survive long enough to migrate into interstellar dust clouds, they might be able to shield themselves from destructive radiation.
In the lab, they found that when pyrimidine is frozen in ice mostly consisting of water, but also ammonia, methanol or methane, it is much less vulnerable to destruction by radiation than it would be if it were in the gas phase in open space.
Instead of being destroyed, many of the molecules took on new forms such as uracil, cytosine and thymine which are found in the genetic make-up of all living organisms on Earth.
The research was funded by the Nasa Astrobiology Institute (NAI) and the Nasa Origins of Solar Systems Programme.