A template-free and low temperature method for the synthesis of mesoporous magnesium phosphate with uniform pore structure and high surface area.