Several lifestyle factors have been found to be associated with vitamin D status in cross-sectional studies, but it is not clear whether a change in these factors can actually affect the vitamin D level. We investigated the association between repeated measurements of physical activity, body mass index (BMI), diet, alcohol consumption, and smoking habits, and corresponding levels of vitamin D during 5 years of follow-up of a large general population sample. We included 4185 persons who participated and had vitamin D (serum-25-hydroxyvitamin D, 25-OH-D) measurements in the Inter99 study at baseline (1999-2001) and 5-year follow-up. In a subsample, 25-OH-D was also measured at 1- and 3-year follow-ups. We used mixed models to examine the association between repeated measurements of lifestyle factors and 25-OH-D levels. In multivariable analyses of repeated measurements, the difference in 25-OH-D was -0.32 ng/ml (95 % CI -0.37, -0.28) per 1 kg/m(2) increase in BMI; 4.50 ng/ml (95 % CI 3.84, 5.15) for persons moderately/vigorously physically active versus sedentary; 1.82 ng/ml (95 % CI 1.09, 2.56) for persons with healthy versus unhealthy dietary habits; 0.05 ng/ml (95 % CI 0.03, 0.07) per 1 standard drink/weak increase in alcohol consumption; and 0.86 ng/ml (95 % CI 0.36, 1.35) for never smokers versus daily smokers. Our study shows that lower BMI, a higher level of physical activity, a healthier diet and possibly a higher alcohol intake, and not smoking, are associated with higher 25-OH-D levels.