Recent evidence suggests a role for vitamin D in pathogenesis and prevention of diabetes mellitus. Active vitamin D, 1 alpha,25(OH)(2)D-3, prevents type 1 diabetes in animal models, modifies T-cell differentiation, modulates dendritic cell action and induces cytokine secretion, shifting the balance to regulatory T cells. High-dose vitamin D supplementation early in life protects against type 1 diabetes. 1 alpha,25(OH)(2)D-3 activity is mediated through its receptor, and targets include transcriptional regulators; therefore, 1 alpha,25(OH)(2)D-3 influences gene transcription. 1 alpha,25(OH)(2)D-3 also affects pancreatic beta-cell function. Genomic variations of vitamin D metabolism and target cell action predispose to type 1 diabetes. Vitamin D deficiency in pregnancy probably increases the incidence of autoimmune diseases, such as type 1 diabetes, in genetically predisposed individuals. Pharmacotherapy with 1 alpha,25(OH)(2)D-3 analogues might help prevent and treat diabetes.