MgFe3Ni2Sb(PO4)6 crystallizes in the trigonal R3 space group. Mg(1) is bonded to three equivalent O(7) and three equivalent O(8) atoms to form MgO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra and corners with three equivalent P(2)O4 tetrahedra. There are three inequivalent Fe sites. In the first Fe site, Fe(1) is bonded to three equivalent O(2) and three equivalent O(5) atoms to form distorted FeO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra, corners with three equivalent P(2)O4 tetrahedra, and  a faceface with one Ni(1)O6 octahedra. In the second Fe site, Fe(2) is bonded to three equivalent O(1) and three equivalent O(4) atoms to form distorted FeO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra and corners with three equivalent P(2)O4 tetrahedra. In the third Fe site, Fe(3) is bonded in a 6-coordinate geometry to three equivalent O(3) and three equivalent O(8) atoms. There are two inequivalent Ni sites. In the first Ni site, Ni(1) is bonded to three equivalent O(2) and three equivalent O(6) atoms to form distorted NiO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra, corners with three equivalent P(2)O4 tetrahedra,  a faceface with one Fe(1)O6 octahedra, and  a faceface with one Sb(1)O6 octahedra. In the second Ni site, Ni(2) is bonded in a 6-coordinate geometry to three equivalent O(4) and three equivalent O(7) atoms. Sb(1) is bonded to three equivalent O(3) and three equivalent O(6) atoms to form distorted SbO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra, corners with three equivalent P(2)O4 tetrahedra, and  a faceface with one Ni(1)O6 octahedra. There are two inequivalent P sites. In the first P site, P(1) is bonded to one O(2), one O(3), one O(4), and one O(8) atom to form PO4 tetrahedra that share  a cornercorner with one Mg(1)O6 octahedra,  a cornercorner with one Fe(1)O6 octahedra,  a cornercorner with one Fe(2)O6 octahedra,  a cornercorner with one Ni(1)O6 octahedra, and  a cornercorner with one Sb(1)O6 octahedra. The corner-sharing octahedral tilt angles range from 8-48°. In the second P site, P(2) is bonded to one O(1), one O(5), one O(6), and one O(7) atom to form PO4 tetrahedra that share  a cornercorner with one Mg(1)O6 octahedra,  a cornercorner with one Fe(1)O6 octahedra,  a cornercorner with one Fe(2)O6 octahedra,  a cornercorner with one Ni(1)O6 octahedra, and  a cornercorner with one Sb(1)O6 octahedra. The corner-sharing octahedral tilt angles range from 26-58°. There are eight inequivalent O sites. In the first O site, O(1) is bonded in a bent 150 degrees geometry to one Fe(2) and one P(2) atom. In the second O site, O(2) is bonded in a 3-coordinate geometry to one Fe(1), one Ni(1), and one P(1) atom. In the third O site, O(3) is bonded in a distorted T-shaped geometry to one Fe(3), one Sb(1), and one P(1) atom. In the fourth O site, O(4) is bonded in a 3-coordinate geometry to one Fe(2), one Ni(2), and one P(1) atom. In the fifth O site, O(5) is bonded in a bent 150 degrees geometry to one Fe(1) and one P(2) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ni(1), one Sb(1), and one P(2) atom. In the seventh O site, O(7) is bonded in a 3-coordinate geometry to one Mg(1), one Ni(2), and one P(2) atom. In the eighth O site, O(8) is bonded in a T-shaped geometry to one Mg(1), one Fe(3), and one P(1) atom.
MgFe3Ni2Sb(PO4)6 crystallizes in the trigonal R3 space group. Mg(1) is bonded to three equivalent O(7) and three equivalent O(8) atoms to form MgO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra and corners with three equivalent P(2)O4 tetrahedra. All Mg(1)-O(7) bond lengths are 2.04 Å. All Mg(1)-O(8) bond lengths are 2.22 Å. There are three inequivalent Fe sites. In the first Fe site, Fe(1) is bonded to three equivalent O(2) and three equivalent O(5) atoms to form distorted FeO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra, corners with three equivalent P(2)O4 tetrahedra, and  a faceface with one Ni(1)O6 octahedra. All Fe(1)-O(2) bond lengths are 2.17 Å. All Fe(1)-O(5) bond lengths are 1.95 Å. In the second Fe site, Fe(2) is bonded to three equivalent O(1) and three equivalent O(4) atoms to form distorted FeO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra and corners with three equivalent P(2)O4 tetrahedra. All Fe(2)-O(1) bond lengths are 1.95 Å. All Fe(2)-O(4) bond lengths are 2.09 Å. In the third Fe site, Fe(3) is bonded in a 6-coordinate geometry to three equivalent O(3) and three equivalent O(8) atoms. All Fe(3)-O(3) bond lengths are 2.02 Å. All Fe(3)-O(8) bond lengths are 2.07 Å. There are two inequivalent Ni sites. In the first Ni site, Ni(1) is bonded to three equivalent O(2) and three equivalent O(6) atoms to form distorted NiO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra, corners with three equivalent P(2)O4 tetrahedra,  a faceface with one Fe(1)O6 octahedra, and  a faceface with one Sb(1)O6 octahedra. All Ni(1)-O(2) bond lengths are 2.02 Å. All Ni(1)-O(6) bond lengths are 2.34 Å. In the second Ni site, Ni(2) is bonded in a 6-coordinate geometry to three equivalent O(4) and three equivalent O(7) atoms. All Ni(2)-O(4) bond lengths are 2.20 Å. All Ni(2)-O(7) bond lengths are 2.29 Å. Sb(1) is bonded to three equivalent O(3) and three equivalent O(6) atoms to form distorted SbO6 octahedra that share corners with three equivalent P(1)O4 tetrahedra, corners with three equivalent P(2)O4 tetrahedra, and  a faceface with one Ni(1)O6 octahedra. All Sb(1)-O(3) bond lengths are 2.49 Å. All Sb(1)-O(6) bond lengths are 2.09 Å. There are two inequivalent P sites. In the first P site, P(1) is bonded to one O(2), one O(3), one O(4), and one O(8) atom to form PO4 tetrahedra that share  a cornercorner with one Mg(1)O6 octahedra,  a cornercorner with one Fe(1)O6 octahedra,  a cornercorner with one Fe(2)O6 octahedra,  a cornercorner with one Ni(1)O6 octahedra, and  a cornercorner with one Sb(1)O6 octahedra. The corner-sharing octahedral tilt angles range from 8-48°. The P(1)-O(2) bond length is 1.54 Å. The P(1)-O(3) bond length is 1.56 Å. The P(1)-O(4) bond length is 1.54 Å. The P(1)-O(8) bond length is 1.57 Å. In the second P site, P(2) is bonded to one O(1), one O(5), one O(6), and one O(7) atom to form PO4 tetrahedra that share  a cornercorner with one Mg(1)O6 octahedra,  a cornercorner with one Fe(1)O6 octahedra,  a cornercorner with one Fe(2)O6 octahedra,  a cornercorner with one Ni(1)O6 octahedra, and  a cornercorner with one Sb(1)O6 octahedra. The corner-sharing octahedral tilt angles range from 26-58°. The P(2)-O(1) bond length is 1.52 Å. The P(2)-O(5) bond length is 1.54 Å. The P(2)-O(6) bond length is 1.63 Å. The P(2)-O(7) bond length is 1.55 Å. There are eight inequivalent O sites. In the first O site, O(1) is bonded in a bent 150 degrees geometry to one Fe(2) and one P(2) atom. In the second O site, O(2) is bonded in a 3-coordinate geometry to one Fe(1), one Ni(1), and one P(1) atom. In the third O site, O(3) is bonded in a distorted T-shaped geometry to one Fe(3), one Sb(1), and one P(1) atom. In the fourth O site, O(4) is bonded in a 3-coordinate geometry to one Fe(2), one Ni(2), and one P(1) atom. In the fifth O site, O(5) is bonded in a bent 150 degrees geometry to one Fe(1) and one P(2) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ni(1), one Sb(1), and one P(2) atom. In the seventh O site, O(7) is bonded in a 3-coordinate geometry to one Mg(1), one Ni(2), and one P(2) atom. In the eighth O site, O(8) is bonded in a T-shaped geometry to one Mg(1), one Fe(3), and one P(1) atom.