Introduction

High-temperature superconductivity (HTSC) is of great interest and importance because superconductors operating under ambient or technologically accessible pressure and temperature conditions can vastly improve many areas of technology. The conventional theories of Bardeen–Cooper–Schrieffer1 and Migdal–Eliashberg2,3 indicate that superconductivity, even at room temperature, cannot be excluded. However, for a long time, the critical temperature of conventional superconductors has been limited to Tc = 39 K in MgB24. The discovery of unconventional superconductivity in the cuprates family has provided a strong motivation to further search for superconducting materials at even higher temperatures. Despite great efforts, superconductivity soon reached its limit in Tc at ~133 K5 (~164 K under pressure6). A microscopic theory of high-Tc unconventional superconductors is still lacking, which hampers further advances in this field.

The breakthrough and tremendous progress for reaching HTSC came with the discovery of the “Earth temperature superconductivity” at 203 K (−70 °C) in H3S at 150 GPa7. This achievement was based on the general assumption by Ashcroft, who suggested that hydrogen-dominant materials are promising candidates for HTSC8, which has then been greatly supported by modern ab initio computational methods for predicting the crystal structure and properties of novel materials9,10,11. This work showed a clear route towards room-temperature superconductivity and initiated extensive high-pressure studies of hydrides, which are conventional phonon-mediated superconductors. Soon Tc reached 252 K in LaH10 at 170 GPa12 (Tc = 260 K was claimed in Somayazulu et al.13), and very recently, Tc = 287 K was reported for the ternary carbon–sulfur–hydrogen system14. In addition, many other superconductors with high Tcs were found (see Review15 and the many refs. within).

While the claim of room-temperature superconductivity14 is waiting for its verification and clarification of the composition and crystal structure of the phase responsible for such high Tc, the superconductivity in H3S and LaH10 compounds has been independently reproduced by several groups. For instance, the superconducting transitions in H3S were confirmed with reported Tcs between 183 and 200 K16,17,18,19, and superconductivity in LaH10 was verified in close agreement at 250 K13,20,21.

Binary hydrides remain the most promising system for fruitful synergy between theory and experiment. Nevertheless, there is a discrepancy between the measured and predicted Tcs and phase diagrams, and new experimental data are crucial for further improvement of the computational methods. Recent theoretical reports provide convincing predictions for HTSC in the yttrium-hydrogen system. According to the calculations, Tc should be as high as 303 K at 400 GPa22 or 305−326 K at 250 GPa23 in face-centred cubic (fcc) YH10. In addition to YH10, there are other phases with high calculated Tcs, which are predicted to be stable at lower pressures, e.g., hexagonal close packed (hcp) YH9 with a Tc of 253−276 K stable at 200 GPa22 and body-centred cubic (bcc) YH6 with a Tc of 251−264 K stable at 110 GPa24.

In the present work, we report an experimental study of the yttrium-hydrogen system at high pressures and two superconducting bcc-YH6 and hcp-YH9 phases. Both phases have the same crystal structures as those predicted by the calculations22,23,24; however, the observed Tcs are significantly lower than the calculated values by ~30 K. We could not synthesise fcc-YH10, which has the highest computed Tc among the predicted yttrium hydrides. Instead, we revealed that hcp-YH9 is the persistent hydrogen-richest yttrium hydride in the wide pressure-temperature domain up to 410 GPa and 2250 K – under the same conditions where the thermodynamic stability of the fcc-YH10 phase was predicted22. Here, we also discuss the contradictions between different experimental data for the yttrium-hydrogen system. Our preliminary report25 and the present more comprehensive data are in good agreement with the data from Troyan et al.26 but evidently contradict the claim of Tc = 262 K at 182 GPa reported by Snider et al.27.

Results and discussion

Synthesis of samples

We prepared various yttrium hydrides in a diamond anvil cell (DAC) by compressing either yttrium metal in H2/D2 (9 samples), yttrium trihydride YH3/YD3 in H2/D2 (9 samples), or YH3 with NH3BH3 (7 samples). The details for the 31 different samples synthesised and analysed in the present study are summarised in Supplementary Table 1.

In our experiments, yttrium metal reacted with the surrounding hydrogen fluid at 17 GPa at room temperature, which was the lowest pressure at which X-ray diffraction patterns were collected (samples 26 and 27; Supplementary Fig. 1). This chemical reaction occurs even at lower pressures of 1 GPa according to refs. 28,29.

Yttrium hydrides with a higher hydrogen content require much higher pressures for their formation. We synthesised body-centred tetragonal (bct) YH4/YD4 and bcc-YH6/YD6 within a pressure range of 160–175 GPa (Figs. 1 and 2) after heating YH3/YD3 in H2/D2 at 1500 K with the aid of a pulsed laser (samples 5, 7 and 24). Both phases can also be formed by exposing the reactants to higher pressures of ~200–244 GPa at room temperature for several weeks (samples 1, 2, 6, 9 and 10).

Both bct-YH4/YD4 and bcc-YH6/YD6 were observed within a wide pressure range of 160–395 GPa (Fig. 2). Laser heating of these phases with excess H2/D2 at pressures above 185 GPa results in the formation of the hcp-YH9/YD9 phase (samples 1, 2, 3, 6, 7, 10, 17–19 and 21–23).

X-ray diffraction studies

The crystal structures of novel yttrium hydrides were determined by X-ray powder diffraction. The Rietveld refinements for the typical powder diffraction patterns of the I4/mmm YH4, Im-3m YH6 and P63/mmc YH9 phases are shown in Fig. 1. The lattice parameters of these phases were determined at 135–410 GPa for a series of different samples and are listed in Supplementary Tables 15. The volumes of the crystal lattices of the synthesised yttrium hydrides are summarised in Fig. 2a as a function of pressure and are well approximated by the Vinet30 equation of state (fitting parameters are given in Supplementary Table 6). The lattice volumes of bct-YH4, bcc-YH6 and hcp-YH9 (Fig. 2a) and the c/a ratios of bct-YH4 and hcp-YH9 (Fig. 2b) agree well with the theoretical predictions22,23,24,26,31,32, which justifies the assignment of compositions for the hydrides with H/Y > 3.

We also independently estimated the compositions of new yttrium hydrides from the X-ray diffraction data by analysing the hydrogen-induced volume expansion VH. In contrast to the lanthanum-hydrogen system12, in which the VH of 1.8 Å3/H(D) atom is nearly identical in all lanthanum hydrides at approximately 150 GPa, the corresponding volume expansion is anomalously large in YH3 and differs from that in the yttrium hydrides with higher hydrogen content. As a result, bct-YH4/YD4 and fcc-YH3/YD3 have almost the same lattice volumes within a pressure range of 150–250 GPa. Using the extrapolated equation of state for pure yttrium33, the value of VH in bct-YH4(YD4) is 1.7–1.8 Å3/H(D) atom at 180–200 GPa and is comparable with the values measured in other hydrogen-rich metal hydrides12,34,35,36,37. The derived values provide the estimation for compositions of the new bcc and hcp phases as YH5.7(3) and YH8.5(5).

The synthesis of YH10, which, according to theory, is the most promising candidate for the highest Tc of 305−326 K23, was of particular interest for the present study. The calculations on the stability of fcc-YH10 provide contradictory results. Some predictions show that this phase becomes stable at 250 GPa23, which is an apparent contradiction with our observations. Other calculations suggest that at T = 0 K, YH10 is thermodynamically unstable at any pressure22. However, the difference in the Gibbs free energies between fcc-YH10 and hcp-YH9 should decrease at higher temperatures, and fcc-YH10 should become more favourable at temperatures above 1500 K at 375 GPa or above 1100 K at 400 GPa22.

Guided by these calculations, we prepared samples of YH3 with NH3BH3 to study the yttrium-hydrogen system at very high pressures of 325–410 GPa (see Supplementary Table 1). We did not observe fcc-YH10 in the final quenched products after pulsed laser heating of the samples up to 1600–2250 K. There was no hint of the fcc-YH10 phase immediately during pulsed laser heating; only the temperature-induced thermal expansion of the crystal structure of the hcp-YH9 phase at 410 GPa and 2250(10) K was detected (Fig. 3). Notably, excess H2 is hard to control in experiments with NH3BH3 as the source of hydrogen. Nonetheless, it is evident that excess H2 was realised in sample 17 because the initial YH3 completely transformed into single-phase P63/mmc YH9 after laser heating (Fig. 3). It is possible that the predicted YH10 exists at even higher pressures and temperatures, but an experiment at such extreme conditions is currently challenging.

Superconductivity

The electrical resistance measurements of new yttrium hydrides revealed superconductivity with high Tcs (Fig. 4). The observed superconducting transitions were unambiguously assigned to either hcp-YH9/YD9 or bcc-YH6/YD6 by analysing the phase content in several of the prepared samples (see details in Supplementary Table 1). According to the X-ray diffraction data, some samples contained variable amounts of lower hydrides, namely, fcc-YH3 and bct-YH4, originating from the areas near the electrical leads. These areas were relatively poorly heated on purpose by the pulsed laser to prevent the failure of the electrical leads on the samples. The presence of these impurities does not alter the observed HTSC in our samples (see below).

The Tc of hcp-YH9 is higher than that of the bcc-YH6 phase, as follows from the electrical measurements for sample 2 (the black and red curves in Fig. 4a). Prior to laser heating, the sample contained bcc-YH6 and exhibited a superconducting transition with a Tc of 211 K at 201 GPa. After heating at 2000(10) K, most of the bcc-YH6 phase transformed into hcp-YH9, and the superconducting transition shifted to a higher temperature of 243 K (the X-ray diffraction patterns of sample 2 are shown in Supplementary Fig. 2d, e). Identical behaviour was observed for the deuterides in sample 6 at 202 GPa (the black and red curves in Fig. 4b); i.e., the initial bcc-YD6 phase had a Tc of 165 K, and hcp-YD9, which formed after laser heating, exhibited a higher Tc of 172 K (the X-ray diffraction patterns of sample 6 are presented in Supplementary Fig. 3).

The pressure dependencies of Tc for YH9 and YH6 have a “dome-like” shape with the highest measured Tc of 243 K at 201 GPa and 224 K at 166 GPa, respectively (Fig. 4e). Similar maxima at the Tc(P) dependence were previously observed in H3S7 and LaH1012 at 150 GPa. The decrease in Tc with increasing pressure in the bcc-YH6 and hcp-YH9 phases is likely due to either the pressure-induced stiffening of the phonon frequencies similar to that in bcc-H3S38,39 or the presence of a flat region on the Fermi surface and the appearance of a two-gap structure similar to that in fcc-LaH1040,41. The data for bcc-YH6 and YD6 independently measured by Troyan et al.26 agree with this trend. The sharp drop in Tc for YH9 and YH6 at pressures below 195 and 165 GPa, respectively, should be associated with the structural distortions and phase transformations between the high-pressure high-symmetry and low-pressure low-symmetry phases, as was recently demonstrated for H3S18,42 and LaH1021,43.

It should be noted that some samples synthesised by keeping reactants at room temperature for several weeks without laser heating (samples 1, 2, 6 and 10) exhibit Tcs that are lower by 5–10 K in comparison to the samples prepared via laser heating-assisted synthesis (the corresponding symbols are outlined by the red circles in Fig. 4e, f). This effect should be attributed to the poorer crystallinity and homogeneity of the superconducting phase in the non-annealed samples, which manifested in the broadening of the Bragg reflections in the X-ray diffraction powder patterns (Supplementary Figs. 2 and 3). Similar behaviour was previously shown in H3S7,18.

Isotope effect

The substitution of hydrogen by deuterium in the samples resulted in a pronounced shift in Tc to lower temperatures. The transition temperature shifted to 168 K for YD6 in sample 7 at 173 GPa and 172 K for YD9 in sample 6 at 205 GPa (Fig. 4c, d). This isotope effect supports the conventional phonon-assisted mechanism of superconductivity. Using the Tc values measured for hcp-YH9/YD9 and bcc-YH6/YD6 within the pressure range of 183–205 GPa (samples 2, 4, 6 and 7), we calculated the isotope effect coefficient, $$\alpha =-\frac{{{dlnT}}_{{{{\mathrm{c}}}}}}{{dlnM}}$$, where M is the atomic mass, to be 0.39 for the bcc-YH6/YD6 phase and 0.50 for the hcp-YH9/YD9 phase. The isotope coefficient value for bcc-YH6/YD6 is smaller than the maximal expected BCS value of 0.5 for a harmonic case. This result likely stems from the anharmonic effects and the contribution of acoustic phonons to electron-phonon coupling.

Resistance measurements under high magnetic fields

In addition to the observed drops in the resistance to a zero value and the isotope effect, the onset of superconducting order was independently verified by the magneto-transport measurements under magnetic fields up to 9T. While the magnetic field has a negligible effect on the resistance of the normal metal, Tc is strongly reduced as the magnetic field increases, and superconductivity is completely suppressed at fields above the upper critical field Hc2. Hc2 is the most direct probe of the coherence length of the superconducting order parameter $$\xi =\sqrt{\frac{{{{{\rm{\phi }}}}}_{0}}{2{{{\rm{\pi }}}}{{{{\rm{H}}}}}_{c2}}}$$, where ϕ0 is the magnetic flux quantum. Figure 5a, b show the dependence of the superconducting transition in samples 5 and 6 as a function of external magnetic field. To estimate the Hc2 and ξ at zero temperature, we plotted the dependence of Tc on the applied external magnetic field, following the criterion of 90% of the resistance in the metallic state (Fig. 5c). The temperature dependence of Hc2 can be approximated by the Ginzburg–Landau (GL) equation44 for $$\frac{{T}_{{{{\mathrm{c}}}}}-T}{{T}_{{{{\mathrm{c}}}}}}\ll 1$$ and more accurately by the Werthamer–Helfand–Hohenberg (WHH)45 model for all temperatures. The light and dark curves in Fig. 5c show the results of the fits for the experimental values of Hc2(T) to the GL and WHH relations. These fits yield Hc2WHH(0 K) = 60 T (Hc2GL(0 K) = 46 T) for hcp-YD9 and Hc2WHH(0 K) = 157 T (Hc2GL(0 K) = 107 T) for bcc-YH6. The latter values are in good agreement with the estimate of Hc2(0 K) = 116–158 T by Troyan et al.26. The corresponding coherence length ξ (0 K) in bcc-YH6 and hcp-YD9 are 1.45–1.75 nm and 2.3–2.7 nm, respectively.

We estimated Hc2WHH (0 K) = 120 T (Hc2GL (0 K) = 92 T) for hcp-YH9 using the relation of $${H}_{{{{\mathrm{c}}}}2} \sim \,{(\frac{{T}_{{{{\mathrm{c}}}}}}{{v}_{{{F}}}})}^{2}$$ and assuming the same Fermi velocities υF in YH9 and YD9 counterparts. Generally, higher Tc values correlate with higher Hc2(0 K) values in the studied hydride superconductors, e.g. Hc2 = 144 T and Tc = 250 K were observed in LaH1012,21, Hc2 = 88 T and Tc = 197 K in H3S16, Hc2 = 45 T and Tc = 153 K in ThH10 and Hc2 = 38 T and Tc = 145 K in ThH936, Hc2 = 29 T and Tc = 98 K in CeH1046, and Hc2 = 11 T and Tc = 68 K in SnHx47. Conversely, the hcp-YH9 phase has higher Tc = 243 K but lower Hc2 comparing with bcc-YH6 phase. This is likely caused by the difference in electronic band structure in these phases, and further theoretical calculations are required to explain this anomaly.

We found that despite a substantial difference in the Hc2(0 K) values for YD9 and YH6 samples, the Fermi velocities υF estimated via the BCS relation: $$\xi =0.18\frac{\hslash {\upsilon }_{{{{\rm{F}}}}}}{{k}_{{{{\mathrm{B}}}}}{T}_{{{{\mathrm{c}}}}}}$$ are quite similar, i.e. 2.85 × 105 and 2.3 × 105 m/s, respectively. Similar υF values were reported for other superconductors of so-called “superhydride” family including SnHx47 and LaH1021. This indicates that the dispersion of the charge carriers contributing to the superconductivity does not significantly change between different superconducting hydrides. Interestingly, nearly constant values of υF were also revealed for various unconventional high-temperature superconductors of the cuprates family48.

Stability range of yttrium hydrides

The predicted crystal structures of the YH3, YH4, YH6 and YH9 compositions are in excellent agreement with the experimental results. To assess the accuracy of the calculations, we compared the predicted formation pressures for these novel hydrides with our experimental observations. The problem of determining the equilibrium pressure in experiments is often exacerbated by the presence of large baric hysteresis between the formation and decomposition pressures. It is generally accepted that the equilibrium pressure in most metal-hydrogen systems is much closer to the decomposition pressure of the high-pressure phase49,50. Decreasing pressure in sample 2 resulted in the decomposition of YH9 into bcc-YH6 at 159 GPa (Supplementary Fig. 2f), which is considerably higher than the predicted YH9 equilibrium formation pressure of 100 GPa22. The sharp drop in Tc for hcp-YH9 at 185 GPa (open black star in Fig. 4e) indicates that this phase is dynamically unstable below this pressure. Decreasing pressure in sample 24 resulted in a decomposition of bcc-YD6 at 135 GPa, whereas bct-YD4 was stable down to at least 135 GPa (Supplementary Tables 1 and 3). This result is in reasonable agreement with the predicted equilibrium formation pressure of 110 GPa for both phases24.

The predicted Tcs of 251–264 K for bcc-YH624 and 253–276 K22 for the hcp-YH9 phase are ~30 K higher than the present experimental values. Recent calculations26 for the bcc-YH6 phase, which accounted for the anharmonicity, demonstrate a Tc of 236–247 K, which is still significantly higher than the experimental value. In addition, we did not observe superconductivity in fcc-YH3 upon cooling down to 5 K in the pressure range of 15–180 GPa or in bct-YH4 upon cooling down to 78 K at 250 GPa (Supplementary Fig. 4), while both phases were predicted to be superconductors with Tcs of 40 K51 and 84–95 K24,32, respectively.

Comparison with other works

In the recent report, Snider et al27. claimed a significantly higher maximum Tc = 262 K at 182(8) GPa in the yttrium-hydrogen system. Their values of Tcs measured in the pressure range of 134–187 GPa and the pressure dependence of Tc contradict the results of both the present work and Troyan et al.26 (Supplementary Fig. 5). This strong disagreement raises a question about the material studied in Snider et al.27. Unfortunately, the lack of any X-ray structural characterisation of the samples in Snider et al.27 makes the direct comparison impossible. The superconductivity was putatively assigned to P63/mmc YH9 based on a comparison of the measured and computed Raman spectra27. However, Raman spectroscopy is not a reliable method for the identification of a crystal structure. Moreover, bct-YH4, bcc-YH6 and hcp-YH9 are good metals and could not account for the observed Raman spectra. Presently, we observed Raman spectra only for mixtures with a hydrogen-depleted fcc phase with a composition close to YH1/YD1, which was formed during the compression of the initial YH2.92(5) and YD2.87(5) above 100 GPa (see Methods section for details and Supplementary Fig. 6). Furthermore, the superconducting transitions measured in Snider et al.27. below 185 GPa cannot be assigned either to hcp-YH9/YD9 because it is unstable in this pressure range or to bcc-YH6 because this phase has a significantly lower Tc.

Summary

We report on the superconductivity in hcp-YH9 with a maximum Tc of 243 K at 201 GPa, which is the second highest Tc measured for the family of transition element superhydrides, and bcc-YH6 with a Tc of 220 K at 183 GPa. At higher pressure, both phases demonstrate a decrease in Tc. The decrease in Tc under external magnetic fields additionally confirms the superconductivity in novel yttrium superhydrides, and the isotopic shift in the superconducting transition in deuterides to lower temperatures supports the conventional phonon-assisted mechanism of superconductivity. We found good agreement between the predicted and experimental crystal structures and the V(P) dependencies of the synthesised hydrides. However, the measured Tcs for bcc-YH6 and hcp-YH9 are markedly lower than the computed values of 251−264 K for YH624 and 253−276 K for YH922. We did not find the fcc-YH10 phase despite extensive trials at pressures up to 410 GPa and temperatures up to 2250 K.

Methods

Diamond anvil cell

Typically, DACs have diamonds bevelled at 8° to a diameter of ~250 µm with a culet size of ~15−35 µm. The diamond anvils had a toroidal profile for the samples pressurised over 200 GPa, which was machined by a focused beam of xenon ions (FERA3, Tescan). Four tantalum or tungsten leads covered by gold were deposited onto the surface of one diamond anvil in a van der Pauw geometry. A metallic gasket (T301 stainless steel) was thoroughly isolated from the sputtered leads by a non-conducting layer prepared from a mixture of low-viscosity epoxy resin and a fine powder of either CaF2, CaO, MgO, CaSO4, cBN or Al2O3. The insulating gasket was pressed to a thickness of 3–5 μ, and a hole with a diameter of ~2/3 of the culet size was drilled by a pulsed ultraviolet laser.

Preparation of samples

Yttrium hydrides were synthesised in situ in a DAC via a direct reaction between either metallic yttrium (99.9%, Sigma Aldrich)) and H2 (99.999%) (D2, 99.75%, Spectra Gases) or, alternatively, YH3 (YD3) and H2 (D2) at pressures up to ~250 GPa. As an alternative source of hydrogen, NH3BH3 (97%, Sigma Aldrich) was used at pressures of 250–410 GPa. The Y or YH3 (YD3) pieces were typically 5–15 µm in diameter and 1–2 µm thick. The samples were handled in an inert Ar or N2 atmosphere with residual O2 and H2O contents of <0.1 ppm to prevent oxidation. The procedure of hydrogen gas clamping and laser heating-assisted synthesis was the same as that for lanthanum hydrides12. One-side heating of the sample was performed with the aid of a pulsed YAG laser. Elevated temperatures accelerate the diffusion of hydrogen into the metal; however, hot hydrogen can easily break diamond anvils by penetrating deep into microcracks at the surface of diamond. We avoided this by the rigorous polishing and etching of diamonds.

All samples synthesised and studied in the present work are summarised in Supplementary Table 1.

The YH3 and YD3 samples used as the initial materials in the DAC experiments were synthesised using bulk yttrium metal that was preliminarily annealed in a vacuum of ~10−3 Torr at 400 °C and then exposed to H2(D2) gas at a pressure of ~100 bars at 400 °C for 4 h and then at 200 °C for 24 h in a high-pressure Sievert-type apparatus52. According to a weighting method, the products were YH2.92(5) and YD2.87(5). The samples were powdered and analysed with an Empyrean X-ray diffractometer in an inert atmosphere under ambient conditions. These materials consisted of pure single-phase hcp-YH~3 and YD~3 (Supplementary Fig. 7). The lattice parameters of both products were in agreement with published data53. For brevity, these materials are referred to as YH3 and YD3 throughout the paper.

Electrical transport measurements

DC electrical measurements were performed on cooling and warming cycles with an electrical current of 10−5–10−3 A (Keithley 6220 and 2000). The present data were taken upon warming as it yields a more accurate temperature reading; that is, the cell was warmed up slowly (0.2 K min−1) in a quasi-isothermal environment without coolant flow. The temperature was measured with an accuracy of ~1 K by a Si diode thermometer (Lakeshore DT-470) attached to the DAC body. The Tc was determined from the onset of superconductivity at the point of the apparent deviation of the temperature dependence of the resistance from the normal metallic behaviour.

Alongside the standard stainless steel DACs, special types of DACs with external diameters of 20 mm and 8.8 mm made of non-magnetic materials were used for measurements under external magnetic fields using a 9T Quantum Design Physical Property Measurement System (PPMS).

Estimation of pressure

The pressure in the DACs was estimated using the H2 (D2) vibron scale54 if the corresponding vibron could be observed in the Raman spectra or diamond scale55 based on the shift of the Raman line edge of stressed diamond and marked throughout the text as PH and PD, respectively. Typically, the second scale provides overestimated pressure values by ~5–40 GPa, which is a result of a large pressure gradient between the soft H2/D2 medium and the surrounding harder gasket. Unless otherwise stated, the pressure values displayed in the figures were estimated using the H2 (D2) vibron scale. Additionally, the pressure in samples 22, 26 and 27 was estimated using the equation of state of MgO56, which served as a gasket material.

X-ray diffraction measurements

X-ray diffraction data were collected at beamline 13-IDD at GSECARS, Advanced Photon Source, using λ1 = 0.2952 Å and λ2 = 0.3344 Å, a beam spot size of ~2.5 × 2.5 µm2, and a Pilatus 1 M CdTe detector. A typical exposure time varied between 10 and 300 s. To examine the formation of new yttrium hydrides at 325–410 GPa at high temperatures, we collected X-ray powder diffraction patterns in situ at high temperature. Each pattern was collected by accumulating 5 × 105 shots with a duration of 1 µs, which were synchronised with laser heating pulses. The temperature was determined by the thermal emission from the sample measured with a PI-MAX3 detector. Primary processing and integration of the powder patterns were performed using Dioptas software57. The indexing of powder patterns and refinement of the crystal structures were done with the GSAS and EXPGUI packages58.

YH3 and other phases formed under hydrogen deficiency

In separate experiments, we characterised YH3 and YD3, which were the starting materials for the synthesis of higher hydrides in our study, during compression up to 180 GPa. Hcp-YH3 is the yttrium hydride with the highest hydrogen content under ambient conditions. It is a black narrow-bandgap semiconductor with a metallic lustre. At increasing pressure, hcp-YH3 undergoes a continuous phase transition at ~10–25 GPa into fcc-YH352,59,60. A further pressure increase results in continuous metallisation, which is accompanied by a disappearance of the Raman spectrum at 80 GPa and a significant decrease in electrical resistance from 50 Ω at 16 GPa to 0.12 Ω at 81 GPa (Supplementary Fig. 8). This behaviour agrees well with previous measurements61. YH3 and YD3 retain the fcc metal sublattice upon compression up to 150 GPa (samples 12–13 and 26–30), in agreement with theoretical calculations31. However, we observed the formation of another fcc phase in addition to fcc-YH3(YD3) at pressures above 100 GPa during the compression of the initial YH2.92(5) and YD2.87(5) samples (Supplementary Fig. 6). The formation of this new phase is accompanied by the appearance of a strong Raman spectrum. Its lattice volume is smaller by ~5 Å3 per Y atom than that of YH3/YD3, likely indicating a reduced hydrogen content close to YH1/YD1. We did not observe this hydrogen-depleted phase in samples compressed in H2 or D2 medium (samples 25, 27–29). Thus, the formation of the fcc-YH1/YD1 phase is likely driven by the non-stoichiometric composition of the initial materials. A similar phenomenon was previously observed in substoichiometric LaH2.3 upon compression in an inert medium, and it was attributed to a disproportionation reaction into the hydrogen-enriched stoichiometric LaH3 and hydrogen-depleted solid solution62.

In addition to the I4/mmm YH4, Im-3m YH6 and P63/mmc YH9 phases discussed in detail in the main text, we observed some unidentified impurity phases with complex X-ray powder diffraction patterns. Typical X-ray diffraction powder patterns of unidentified impurities are plotted in Supplementary Fig. 9a. Since such phases were found in samples with an evident deficiency of H2 (D2) or in the poorly heated areas of samples, their H/Y ratio is likely <9. Troyan et al.26 also found some new phases at pressures of 165–180 GPa and assigned them to the YH7 and Y2H15 hydrides. None of these phases fit the reflections from the unidentified phases observed in the present study.

In sample 28 at a lower pressure of 105 GPa, we found a new bcc phase with a composition close to YH4 (Supplementary Fig. 9b, c).