An essential nutrient for life on Earth also cooks up in space, a new study finds.

While scientists aren't yet sure of the exact recipe, they think radiation-blasted ice powered the chemical reactions that produced vitamin B3, or niacin, early in the solar system's history. A stew of dust and ice created key molecules for life in this planetary kitchen, which all later clumped into asteroids and comets, suggests the new study, published April 13 in the journal Geochimica et Cosmochimica Acta.

Some researchers think impacts on early Earth could have delivered chemicals essential for life, such as amino acids and vitamins like niacin. Today, niacin isn't made by the human body, and must be consumed in the diet. [7 Wild Theories on the Origin of Life]

"Vitamin B3 is essential to metabolism and likely very ancient in origin," lead study author Karen Smith of Pennsylvania State University said in a statement.

Smith and her co-authors discovered vitamin B3 in eight carbon-rich meteorites. (When fragments of an asteroid fall to Earth, they're called meteorites.) The meteorites are all CM-2 carbonaceous chondrites, one of the most common meteorite types found on Earth.

The meteorite's vitamin B3 levels ranged from 30 to 600 parts per billion, the study reports. Related molecules discovered in the meteorites include pyridine carboxylic acids and pyridine dicarboxylic acids.

The amount of vitamin B3 in the meteorites was linked to how much their parent asteroids were altered by water, Smith said. "We discovered a pattern — less vitamin B3 was found in meteorites that came from asteroids that were more altered by liquid water," she said. Several chemical and mineral traces in meteorites show how much an asteroid was altered by water.

The researchers also tested their theory of how vitamin B3 may form in space with laboratory experiments. "We showed that the synthesis of vitamin B3 might be possible on ice grains," Smith said.

Earlier research has also shown vitamin B3 can be produced non-biologically on Earth, Smith said. The team plans further experiments to explore how the vitamin can form on ice grains in space.

More on LiveScience and MNN:

This story was originally written for LiveScience and has been republished with permission here. Copyright 2014 LiveScience, a TechMediaNetwork company.