  The discovery of high-temperature superconductivity above 240 K in binary
La-H and Y-H systems inspired further predictions of even higher transition
temperatures in compounds such as YH10 and MgH6, which are likely to be
dynamically unstable. Ternary superhydrides provide alternative pathways to
stabilize desired near-room temperature superconducting phases. However, the
synthesis of new ternary hydrides remains challenging because most of the
precursor reactants do not exist in desired stoichiometry at ambient
conditions. Here we report that using the existing binary intermetallic CaMg2
and 1:1 Ca-Mg mixture as starting reactants, we have successfully synthesized
novel Ca-Mg-based ternary superhydrides at megabar pressures. Electrical
resistivity measurements show Tc approaching 168 K at 310 GPa in the
CaMg2-based superhydride and 182 K in 1:1 the Ca-Mg superhydride at 324 GPa.
