We tested the hypothesis that increased intakes of calcium and phosphate lower magnesium solubility in the intestinal lumen, causing a decreased magnesium absorption. In in vitro experiments at a constant magnesium concentration, increasing calcium concentrations reduced magnesium solubility. This effect did not occur in the absence of phosphate. Increasing phosphate concentrations decreased the solubility of magnesium in the presence, but not in the absence, of calcium. These results suggest that the formation of an insoluble calcium-magnesium-phosphate complex determines magnesium solubility. To extend this concept to in vivo conditions, rats were fed purified diets containing a constant concentration of magnesium (16.4 mumol/g) but different concentrations of calcium (25, 100 or 175 mumol/g) and phosphate (58, 103 or 161 mumol/g). Increased intakes of calcium decreased magnesium solubility in the ileal lumen and lowered magnesium absorption. The latter result occurred only if the dietary phosphate concentration was at least 103 mumol/g. Increasing dietary phosphate concentrations reduced both magnesium solubility in the ileum and magnesium absorption, but only if the dietary calcium concentration was at least 100 mumol/g. These results support those obtained in vitro. We conclude that increased intakes of calcium and phosphate decrease magnesium absorption by the formation of an insoluble calcium-magnesium-phosphate complex in the intestinal lumen.