BaMg2RuH8 crystallizes in the tetragonal P4_2/mmc space group. Ba(1) is bonded to four equivalent H(2) and four equivalent H(3) atoms to form BaH8 hexagonal bipyramids that share corners with four equivalent Ru(1)H6 octahedra and edges with four equivalent Ba(1)H8 hexagonal bipyramids. The corner-sharing octahedral tilt angles are 68°. Mg(1) is bonded in a 6-coordinate geometry to two equivalent H(2) and four equivalent H(1) atoms. Ru(1) is bonded to two equivalent H(3) and four equivalent H(1) atoms to form RuH6 octahedra that share corners with four equivalent Ba(1)H8 hexagonal bipyramids. There are three inequivalent H sites. In the first H site, H(1) is bonded in a T-shaped geometry to two equivalent Mg(1) and one Ru(1) atom. In the second H site, H(2) is bonded in a distorted water-like geometry to two equivalent Ba(1) and two equivalent Mg(1) atoms. In the third H site, H(3) is bonded in a distorted trigonal planar geometry to two equivalent Ba(1) and one Ru(1) atom.
BaMg2RuH8 crystallizes in the tetragonal P4_2/mmc space group. Ba(1) is bonded to four equivalent H(2) and four equivalent H(3) atoms to form BaH8 hexagonal bipyramids that share corners with four equivalent Ru(1)H6 octahedra and edges with four equivalent Ba(1)H8 hexagonal bipyramids. The corner-sharing octahedral tilt angles are 68°. All Ba(1)-H(2) bond lengths are 2.77 Å. All Ba(1)-H(3) bond lengths are 2.68 Å. Mg(1) is bonded in a 6-coordinate geometry to two equivalent H(2) and four equivalent H(1) atoms. Both Mg(1)-H(2) bond lengths are 1.97 Å. All Mg(1)-H(1) bond lengths are 2.12 Å. Ru(1) is bonded to two equivalent H(3) and four equivalent H(1) atoms to form RuH6 octahedra that share corners with four equivalent Ba(1)H8 hexagonal bipyramids. Both Ru(1)-H(3) bond lengths are 1.69 Å. All Ru(1)-H(1) bond lengths are 1.71 Å. There are three inequivalent H sites. In the first H site, H(1) is bonded in a T-shaped geometry to two equivalent Mg(1) and one Ru(1) atom. In the second H site, H(2) is bonded in a distorted water-like geometry to two equivalent Ba(1) and two equivalent Mg(1) atoms. In the third H site, H(3) is bonded in a distorted trigonal planar geometry to two equivalent Ba(1) and one Ru(1) atom.