The aim of this study was to investigate the effects of dietary Ca level (4.9, 9.3, and 13.6 g/kg of DM) on Ca and Mg homeostasis in dairy cows around parturition. Cows of the Swedish Red breed (n = 29) with no previous veterinary treatment for milk fever were divided into 3 groups, and each group was fed one of the different diets during the last 15 to 32 d of gestation. Calcium was added as ground limestone, and the Mg concentration was 1.8 g/kg of DM in all diets. After calving the cows were fed similar diets. Plasma was sampled twice per week until calving, and 6, 12, and 24 h, 2, 4, and 7 d after calving. Spot urine samples were collected twice weekly until calving and creatinine was used as a marker of daily urinary excretion. Fecal samples were collected 2 times per day for 5 d starting 2 wk before expected calving, and acid-insoluble ash was used as an indigestible marker to estimate digestibility. Apparent digestibility of Mg and daily Mg excretion in the urine were lower in the dry period for cows fed the highest Ca level. Plasma Mg concentration was lower on 2, 4, and 7 d after calving in cows fed the highest level of Ca. Treatment groups did not differ in plasma Ca concentration, parathyroid hormone concentration, or bone mobilization, evaluated using crosslinked carboxyterminal telopeptides of type I collagen (CTx) as a marker. Plasma Ca concentration decreased and plasma CTx concentration increased 6 h after calving. The apparent digestibility of Ca during the dry period was not affected by dietary Ca, but the cows fed 4.9 g Ca/kg of DM excreted 1.2 g of Ca/d in the urine, which was higher compared with 0.4 g/d and 0.6 g/d for the cows fed 9.3 g of Ca/kg of DM and 13.6 g of Ca/kg of DM, respectively. The results show that feeding 13.6 g of dietary Ca/kg of DM impaired the Mg absorption during the dry period, and resulted in decreased plasma Mg concentration after calving, but prepartum dietary Ca level did not affect plasma Ca, parathyroid hormone, or CTx concentrations.