OBJECTIVE: To examine the potential association between vitamin D (VitD) deficiency and latent tuberculosis infection (LTBI) and its effect on TB infection conversion (TBIC) incidence.MATERIAL AND METHODS: We carried out a cross-sectional and prospective cohort study of nine pulmonary TB cases that occurred in 2015-2016 in five nursing homes and one mental disability institution in Castellon, Spain. QuantiFERON®-TB Gold and the tuberculin skin test were used to detect LTBI and TBIC, respectively. Serum 25-hydroxyvitamin D was measured using chemiluminescence immunoassay. Poisson regression and inverse probability weighting were used for statistical analyses.RESULTS: The study included 448 residents, 341 staff members with 48 relatives of TB cases (participation rate 82%): of these, respectively 122 (27.2%), 37 (10.9%) and 7 (14.6%) were LTBI-positive; and respectively 22 (7.7%), 10 (3.8%) and 1 (3.7%) were TBIC-positive. LTBI was not associated with VitD status. Severe VitD deficiency (SVDD; defined as VitD level < 10 ng/ml), found in 45.1% of residents, as well as VitD levels of <30 ng/ml (aRR 10.41 95% CI 1.48-73.26), were associated with increased TBIC risk (adjusted relative risk [aRR] 12.1, 95% CI 1.51-97.10), suggesting SVDD as a threshold effect. CONCLUSION: Severe VitD deficiency is a TBIC risk factor.