Not getting enough vitamin D could triple your risk of an early death, research has suggested.
Scientists found having low levels of the vitamin - made by the body when exposed to sunlight - is heavily linked to dying from any cause.
The research also uncovered diabetes patients faced an even greater risk of death if they were vitamin D deficient.
Results showed patients were four-and-a-half times more likely to die from diabetes if they had low levels of the nutrient.
Charities today warned the findings did not prove being vitamin D deficient plays a direct role in causing an early death.
Researchers looked at records of 78,581 diabetics of all ages at the General Hospital of Vienna in Austria between 1991 and 2011.
Data was then matched with the Austrian national register of deaths 20 years later. There were 11,877 deaths in that time.
Patients with a vitamin D level of less than 50 nanomoles per litre (nmol/L) were considered deficient - widely recognised as a deficiency.
Researchers then set low and high levels of 10 nmol/L and 90 nmol/L to compare how levels of the vitamin affected mortality.
The study found vitamin D levels of 10 nmol/L or less were associated with a two to three times increase in risk of death of any cause.
The largest effect was observed in patients aged 45 to 60 years. according to the team at the Medical University of Vienna.
Levels of 90 nmol/L or greater were linked to a reduction in all-cause mortality of 30 to 40 per cent.
No statistically significant associations between vitamin D levels and mortality were observed in patients over the age of 75 years.
The risk of death from infectious diseases also doubled in the vitamin D deficient group, the researchers also found.
The researchers said: 'Our survival data... confirm a strong association of vitamin D deficiency (under 50 nmol/L) with increased mortality.
'This association is most pronounced in the younger and middle-aged groups and for causes of deaths other than cancer and cardiovascular disease, especially diabetes.'
Dr Faye Riley, research communications officer at Diabetes UK, issued caution over the findings.
She said: 'Having any vitamin deficiency is going to negatively impact your health one way or another, regardless of whether or not you have diabetes.
'But it’s important to note this study doesn’t show that vitamin D levels play a direct role in causing early death in people with diabetes.
'When the sun is out, you’re following a healthy diet and spending time outside, then vitamin D supplements shouldn’t be necessary.
'However Public Health England recommends that during autumn and winter people consider taking a daily supplement containing 10 micrograms of vitamin D.'
One in five British adults and one in six children is deficient in the vitamin, thanks to our modern diets, indoor lifestyle and grey weather.
The findings are to be presented at this year's Annual Meeting of the European Association for the Study of Diabetes in Barcelona.
Around 4.7million people are living with diabetes in the UK. It can lead to blindness, kidney failure, heart attacks and strokes.