In the present study, based on two Swedish population-based case–control studies, we aimed to investigate to what extent the influence of low sun exposure on MS risk is mediated by vitamin D. We also aimed to study whether low sun exposure or vitamin D deficiency act synergistically with HLA-DRB1*15:01and absence of HLA-A*02:01 to increase MS risk. Here, HLA-A is linked to vitamin D deficiency.