The title compound, Mg(7)(PO(4))(2)(HPO(4))(4), was synthesized by the hydro-thermal method. The structure is based on a framework of edge- and corner-sharing MgO(6) and MgO(4)(OH)(2) octa-hedra, an MgO(5) polyhedron, PO(4) and PO(3)(OH) tetra-hedra. All atoms are in general positions except for one Mg atom, which is located on a crystallographic inversion centre. The OH groups, bridging Mg-(OH)-P, are involved in strong hydrogen bonds. Compounds with the general formula M(7)(PO(4))(2)(HPO(4))(4) (M = Mg, Mn, Fe and Co) are all isostructural with their homologue arsenate Mg(7)(AsO(4))(2)(HAsO(4))(4).