CONTEXT: Erythropoietic protoporphyria (EPP) is a rare inherited metabolic disease, causing lifelong painful phototoxic reactions, minimal sunlight exposure, and vitamin D deficiency. Previous studies reported a high osteoporosis prevalence in EPP patients. OBJECTIVE: To identify those at risk for low bone mineral density (BMD) and assess which factors, including treatment with cholecalciferol and afamelanotide, improve BMD in EPP. METHODS: A longitudinal ambispective single-center cohort study. Data from patient files and two-time questionnaires from adult patients with EPP who underwent at least one dual-energy x-ray absorptiometry (DXA) scan between 2012 and 2023 were used. RESULTS: BMD is low in EPP patients, with 82.7% of the 139 patients having a Z-score below 0 SD at baseline. Low BMD classified as osteopenia was found in 39.5%, and osteoporosis in 15.3%. There were 50 osteoporosis-related fractures in 34.2% of patients. Aging (odds ratio [OR] 1.08
CI, 1.03-1.12), persistent vitamin D deficiency (OR 1.11
95% CI, 1.00-1.23) and a low body mass index (OR 0.91
95% CI, 0.82-0.99) increased the odds of low BMD. Patients with a vitamin D deficiency (OR 5.51
95% CI, 1.69-17.92) and no cholecalciferol at baseline (OR 0.22
95% CI, 0.04-1.34) had the highest odds of improving their BMD. Afamelanotide did not improve BMD. CONCLUSION: 25-hydroxyvitamin D (25(OH)D) status plays a crucial role in both preventing low BMD and improving BMD. EPP is a natural model for lack of sunlight exposure and vitamin D deficiency, underlining the importance of lifelong adequate vitamin D status for bone health in the general population.