Although genetic susceptibility explains the clustering of multiple sclerosis (MS) cases within families, the changes in MS risk that occur with migration can be explained only by changes in the environment. The strongest known risk factor for MS is infection with Epstein-Barr virus (EBV). Compared with uninfected individuals, the hazard of developing MS is approximately 15-fold higher among individuals infected with EBV in childhood and about 30-fold higher among those infected with EBV in adolescence or later in life. Although the mechanisms underlying this association remain unclear, the data provide strong evidence of a causal relation between EBV infection and MS risk. Relevant aspects of MS epidemiology beyond genetics are not explained by EBV involvement, however, implying the involvement of other factors. Modifiable factors for MS risk include smoking and childhood obesity. Increased risk of MS in individuals with vitamin D insufficiency has been proposed to explain the strong latitude gradient in MS prevalence. Results of case-control studies that relied on prevalent MS cases have been mixed, however, and potentially influenced by selection and recall biases. In a recent case-control study of individuals presenting with a first demyelinating episode, higher levels of vitamin D, sun exposure or actinic damage were found to be associated with reduced MS risk. Two longitudinal studies have thus far been completed. In the first, based on assessment of vitamin D intake from diet and supplements, the risk of MS was found to be 30% lower among women in the highest quintile compared with those in the lowest quintile. In the second study, conducted among young adults in the US military, vitamin D status was assessed by averaging multiple season-adjusted measures of 25-hydroxyvitamin D (25[OH]D). During an average of 5 years' follow-up, MS risk among healthy young adults with serum levels of 25(OH) vitamin D >100 nmol/l was about 60% lower than in individuals of the same age and sex with serum 25(OH) vitamin D levels <100 nmol/l. If confirmed, these findings suggest that a high proportion of MS cases could be effectively prevented by vitamin D supplementation. Furthermore, there is growing evidence that vitamin D insufficiency is a risk factor for conversion from clinically isolated syndrome to MS and for MS progression. Both prevention and treatment trials with vitamin D are needed to confirm these findings and to determine optimal levels of vitamin D.