Scientists have discovered that a hidden vitamin in beer and milk called the "miracle molecule" may prevent obesity.

A new study found that nicotinamide riboside (NR), a molecule found to indirectly influence the activity of cell metabolism, could play an important role in preventing weight gain and diabetes, improving muscular performance and providing other "extraordinary health benefits," according to a Switzerland-based research team.

Researchers from the Polytechnic School in Lausanne say the results of the mice study were "impressive".

"NR appears to play a role in preventing obesity," researchers wrote in the study.

"Mice on a high-fat diet fed NR gained significantly less weight - 60 per cent - than mice eating the same diet, but without NR supplementation," they wrote. "In addition, none of the NR-treated mice had indications that they were developing diabetes, unlike the untreated mice."

The findings, published in the journal Cell Metabolism, showed that mice fed NR supplements over a ten-week period had better endurance performance and improved energy expenditure compared to those who had not received the vitamins.

Mice fed the supplements were also in better shape, after researchers looked examined samples of muscle fibers taken from experimental mice.

Researchers reported no side effects in mice given the NR supplement.

"It really appears that cells use what they need when they need it, and the rest is set aside without being transformed into any kind of deleterious form," said study author Carles Canto in a statement.

Researchers believe that the increase in the NR molecule leads to an improvement in mitochondrial function, the "powerhouse" of the cell that supplies energy.

Mitochondria is also believed to play a role in the aging process, and scientists hypothesize that by stimulating mitochondrial with the NR molecule, longevity as well as other aspects of health will also be improved.

However, researchers said that the molecule is extremely small and difficult to reproduce.

"At the moment, we can't even measure its concentration in milk," he warned. "So it's impossible to know how much you would have to drink to be able to observe its effects."

Researchers hope to test the benefits of the molecule for people in future clinical trials.