Lose weight: It’s the go-to recommendation for preventing diabetes.

But according to new research published in the Journal of Clinical Endocrinology & Metabolism, it may not be enough. Vitamin D deficiency also appears to increase your risk of Type 2 diabetes – no matter your weight.

More than 29 million Americans have diabetes, according to the Centers for Disease Control and Prevention. That’s 9.3 percent of the population. Another 86 million have prediabetes, and up to 30 percent of them will develop Type 2 diabetes in the next five years. In Type 2 diabetes, the body cannot properly use insulin, resulting in chronically high blood sugar levels. Blindness, kidney failure, heart disease, stroke and loss of toes, feet or legs are common side effects.

Meanwhile, up to 41.6 percent of Americans are deficient in vitamin D, according to 2011 a paper published in Nutrition Research. While previous research – including one study published in Diabetes Care – has suggested a link between vitamin D deficiency and diabetes, many experts believed obesity was the middleman. Perhaps vitamin D deficiency spurred weight gain, which, in turn led to diabetes? According to the Endocrine Society’s 2012 scientific statement on vitamin D, people who have low levels of vitamin D are at increased risk of obesity as well as Type 2 diabetes, prediabetes and metabolic syndrome (characterized by high blood pressure, high blood sugar, excess body fat around the waist and abnormal cholesterol levels).

However, more than 10 percent of people living with Type 2 diabetes aren’t overweight, according to the Obesity Society. That might not seem like a huge percentage, but 10 percent of 29.1 million people is still a lot of people.

So, to determine if vitamin D deficiency increases the risk of diabetes – or if it simply causes weight gain – a team of Spanish researchers examined the vitamin D levels, metabolic health and body-mass indexes (a measure of body fat based on height and weight) of 138 adults.

The researchers classified all of the participants from two Spanish hospitals by their BMIs as well as whether they had diabetes, prediabetes or no glycemic disorders. They then measured their blood levels of vitamin D and their adipose (fat) tissues’ expression of the vitamin D receptor gene. (Vitamin D activates genes throughout the body. If the gene is in the fat tissue, vitamin D affects that fat tissue.)

Results showed that obese individuals with diabetes had lower levels of vitamin D than did their diabetes-free counterparts, and that vitamin D gene expression was higher in morbidly obese individuals than in those with lower BMIs. What’s more, healthy-weight subjects with diabetes were more likely to have significantly low levels of vitamin D compared to normal-weight subjects without the disease, suggesting that vitamin D deficiency may throw off metabolic health all on its own – not just by causing weight gain. In fact, vitamin D levels correlated with insulin resistance, but not with BMI, meaning that deficiency can put you at risk for diabetes, even if you’re at a healthy weight.

“Our study shows that the deficit of vitamin D is associated with diabetes and less with obesity,” says study author Manuel Macías-González of Complejo Hospitalario de Málaga (Virgen de la Victoria) and the University of Málaga. “We believe that vitamin D deficiency could be a new mechanism to promote metabolic disorders, such as diabetes.”

He hopes future research will examine how vitamin D and substitutes could affect blood sugar levels and metabolic health in both overweight and healthy-weight individuals.

In the meantime, he believes that – whatever you weigh – you may be able to reduce your risk of diabetes through a healthy vitamin D-rich diet and by spending more time outdoors.

That’s because vitamin D, nicknamed the “sunshine vitamin,” is by and large produced in our bodies when sunlight hits our skin. While it can also be absorbed from the few naturally high-D foods (think eggs and fatty fish such as salmon and tuna) as well as fortified foods (e.g., some milks and cereals), sun exposure is the largest contributor to healthy vitamin D levels. Those who suspect they're not getting enough vitamin D through food and sun exposure can talk to their doctor to see if they have deficiency and, if so, whether supplementation is needed.