A simple vitamin supplement could have the potential to prevent miscarriages and birth defects, according to a 12-year study by scientists in Australia.

Researchers have identified a deficiency in a developmental molecule called NAD that can keep a baby's organs from forming properly in the womb – but the shortfall could be addressed by pregnant women taking vitamin B3, which may prevent a range of birth defects.

It's the first time that NAD (aka nicotinamide adenine dinucleotide) has been linked to congenital abnormalities, identifying a previously unknown cause of birth defects – along with the supplement that might treat the problem.

"The ramifications are likely to be huge," says developmental geneticist Sally Dunwoodie from the Victor Chang Institute.

"This has the potential to significantly reduce the number of miscarriages and birth defects around the world, and I do not use those words lightly."

Dunwoodie's team began their research back in 2005, when they came across the case of a baby with major defects in the heart, backbone, and ribs.

A genomic analysis revealed that both parents carried a mutation in a gene involved in the production of NAD – a vital molecule that contributes to energy production, DNA repair, and cell communication.

Several years later, the researchers found a similar mutation affecting NAD production in the family of another baby born with congenital problems.

"That was our Eureka moment," Dunwoodie told Gretchen Vogel at Science.

In all, the team examined genetic data from 14 families whose children bore congenital birth defects, and found the NAD mutations present in four of them.

To test possible treatment mechanisms, the team engineered mice with the same deficiency, using the CRISPR-Cas9 gene-editing technique.

When female mice with the mutation gave birth, many of their pups died or were born with significant defects – but counterparts fed diets including B3 supplements gave birth to healthier offspring.

Diets with small amounts of vitamin B3 produced baby mice with fewer abnormalities, and feed rich in the supplement fostered a healthy litter of animals.

As far as a proof of concept goes, we've only seen this result in animals – and the principal deficiency has only been studied in four human families – so we shouldn't get too carried away with the findings just yet.

But it's a very promising start down a new avenue in developmental research, and one with the potential to produce life-changing results for thousands of families.

"Arguably, it's the most important discovery for pregnant women since folate," Dunwoodie told Sophie Scott at ABC News, in reference to the landmark research that showed folic acid could reduce the incidence of spina bifida and other neural tube defects.

Vitamin B3, also known as niacin, is usually found in meats and green vegetables, along with condiments such as Vegemite and Marmite.

But while many pregnant women take dietary supplements, research has shown that up to one third of women in the US have low levels of vitamin B3 during their pregnancy.

The team behind the new study hope that's something their findings can turn around, although the research is at too early a stage for scientists to recommend any kind of specific dosage.

"At the moment, the recommendation is to take a standard multivitamin, but we're all different and that will not prevent all women from having babies with birth defects," Dunwoodie told Lara Pearce at Huffington Post.

"We need to identify those women at risk and identify a safe level of niacin for them to take to prevent miscarriages and birth defects."

To that end, the researchers say the next step will be developing a diagnostic test akin to a pregnancy test, sampling either urine or blood, which could easily show which women could be low in NAD.

Nobody knows when this kind of check-up will become available, but we can't wait to see where this research leads – because it's something that could have a huge impact on the health and happiness of too many lives to count.

The findings are reported in The New England Journal of Medicine.