The title compound, AgMg(3)(PO(4))(HPO(4))(2), which has been synthesized by the hydro-thermal method, has an alluaudite-like structure which is formed by edge-sharing MgO(6) octa-hedra (one of which has symmetry 2), resulting in chains linked together by phosphate groups and hydrogen bonds. The three-dimensional framework leads to two different channels along the c axis, one of which is occupied by Ag(+) ions with a square-planar coordination. The Ag(+) ions are disordered over two sites in a 0.89 (3):0.11 (3) ratio. The OH groups, which point into the other type of channel, are involved in strong O-H⋯O hydrogen bonds. The title compound is isotypic with the compounds AM(3)H(2)(XO(4))(HXO(4))(2) (A = Na or Ag, M = Mn, Co or Ni, and X = P or As) of the alluaudite structure type.