Institutionalised elderly people at northern latitudes may be at elevated risk for vitamin D deficiency. In addition to osteoporosis-related disorders, vitamin D deficiency may influence several medical conditions conferring an increased mortality risk. The aim of this study was to explore the prevalence of vitamin D deficiency and its association with mortality. The Study of Health and Drugs in the Elderly (SHADES) is a prospective cohort study among elderly people (>65 years) in 11 nursing homes in Sweden. We analysed the levels of 25-hydroxyvitamin D₃ (25(OH)D₃) at baseline. Vital status of the subjects was ascertained and hazard ratios (HRs) for mortality according to 25(OH)D₃ quartiles were calculated. We examined 333 study participants with a mean follow-up of 3 years. A total of 147 (44%) patients died within this period. Compared with the subjects in Q4 (25(OH)D₃ >48 nmol/l), HR (with 95% CI) for mortality was 2.02 (1.31-3.12) in Q1 (25(OH)D₃ <29 nmol/l) (P<0.05); 2.03 (1.32-3.14) in Q2 (25(OH)D₃ 30-37 nmol/l) (P<0.05) and 1.6 (1.03-2.48) in Q3 (25(OH)D₃ 38-47 nmol/l) (P<0.05). The mean 25(OH)D₃ concentration was 40.2 nmol/l (S.D. 16.0) and 80% had 25(OH)D₃ below 50 nmol/l. The vitamin D levels decreased from baseline to the second and third measurements. Vitamin D deficiency was highly prevalent and associated with increased mortality among the elderly in Swedish nursing homes. Strategies are needed to prevent, and maybe treat, vitamin D deficiency in the elderly in nursing homes and the benefit of vitamin D supplementation should be evaluated in randomised clinical trials.