PURPOSE: Heavy metals and other elements may act as breast carcinogens due to estrogenic activity. We investigated associations between urine concentrations of a panel of elements and breast density. METHODS: Mammographic density categories were abstracted from radiology reports of 725 women aged 40-65 yr in the Avon Army of Women. A panel of 27 elements was quantified in urine using high resolution magnetic sector inductively coupled plasma mass spectrometry. We applied LASSO (least absolute shrinkage and selection operator) logistic regression to the 27 elements and calculated odds ratios (OR) and 95% confidence intervals (CI) for dense vs. nondense breasts, adjusting for potential confounders. RESULTS: Of the 27 elements, only magnesium (Mg) was selected into the optimal regression model. The odds ratio for dense breasts associated with doubling the Mg concentration was 1.24 (95% CI 1.03-1.49). Doubling the calcium-to-magnesium ratio was inversely associated with dense breasts (OR 0.83, 95% CI 0.70-0.98). CONCLUSIONS: Our cross-sectional study found that higher levels of urinary magnesium were associated with greater breast density. Prospective studies are needed to confirm whether magnesium as evaluated in urine is prospectively associated with breast density and, more importantly, breast cancer.