Updated

Scientists have found three genetic differences that affect a person's risk of being deficient in the "sunshine" vitamin D and say their work helps explain why sunlight and a good diet aren't always enough.

British and American researchers studied the genes of almost 34,000 white Europeans and found that variants of three genes involved in cholesterol synthesis, vitamin D metabolism and vitamin D transport may increase the risk of deficiency.

"Our findings establish a role for common genetic variants in regulation of circulating vitamin D concentrations," said Elina Hypponen of the University College London Institute of Child Health, who worked on the study.

She said the presence of the variants at the three specific genes more than doubled the risk of vitamin D insufficiency.

Most vitamin D is made by the body as a natural by-product of the skin's exposure to sunlight. It is vital for health, as it helps cells absorb calcium and is key for bone strength.

Some recent studies have also suggested vitamin D may protect against cancer, artery disease and tuberculosis.

A normal level of vitamin D is defined as a concentration greater than 30 nanograms per milliliter (ng/ml), while vitamin D insufficiency is 20 to 30 ng/ml and vitamin D deficiency is less than 20 ng/ml.

Almost half of the world's population has lower than optimal levels of vitamin D and scientists say the problem is getting worse as people spend more time indoors or cover up too quickly and completely when they are exposed to sunshine.

Non-white populations in less sunny climates are at higher risk since dark skin can make it harder for the body to absorb ultraviolet light.

Hypponen said there was no doubt that sunshine and a good diet were still the most important factors for vitamin D levels, but the study helped explain why some people who should get enough from these sources still appear to be deficient.

"Sometimes when we look at geographical variations in vitamin D deficiency, they do not always go logically in the way we would expect, for example, on the basis of sunlight," she said in a telephone interview. "So this study raises the possibility that that is down to genetic influences.

"Besides the sunlight source, vitamin D can also be found in fish liver oil, eggs and fatty fish such as salmon, herring and mackerel, or taken as a supplement.

There are no definitive studies on the optimal daily vitamin D dose but some experts recommend 25 to 50 micrograms.

A study published in March found that vitamin D is important in activating the immune system's killer cells, known as T cells, which remain dormant and unaware of threats from infections if vitamin D is lacking in the blood.