Being overweight or obese isn’t the only thing that can put you at risk of type 2 diabetes. A new study published in the Journal of Endocrinology & Metabolism shows vitamin D deficiency may also be to blame for folks developing type 2 diabetes, the most common form of this metabolic disease, reports U.S. News & World Report.

For the study, researchers in Spain looked at the vitamin D levels, metabolic health and body-mass indexes (BMIs, a ration of height to weight) of 138 adults. Scientists divided patients by their BMIs and whether or not they had diabetes, pre-diabetes or no blood sugar-level issues. Next, researchers measured the groups’ blood levels of vitamin D as well as the way the vitamin affected their fat tissues.

Results showed that obese patients with diabetes had lower levels of vitamin D than obese people who didn’t have diabetes. What’s more, diabetes patients of healthy weight were also more likely to have low levels of vitamin D compared with those not suffering from glycemic disorders.

Researchers said the findings associated diabetes with a lack of vitamin D more so than with obesity. “We believe that vitamin D deficiency could be a new mechanism to promote metabolic disorders, such as diabetes,” said study author Manuel Macias-Gonzalez at the University of Malaga in Spain.

In general, the scientists suggested that people, regardless of their weight, might be able to reduce their risk of diabetes by eating vitamin D-rich diets and by spending more time outdoors.

Did you know that people of color are prone to vitamin D deficiency? Click here for more information.