A high-pressure (HP) yttrium allotrope, hP3-Y (space group P6/mmm), was synthesized in a multi-anvil press at 20 GPa and 2000 K which is recoverable to ambient conditions. Its relative stability and electronic properties were investigated using density functional theory calculations. A hP3-Y derivative hydride, hP3-YHx, with a variable hydrogen content (x = 2.8, 3, 2.4), was synthesized in diamond anvil cells by the direct reaction of yttrium with paraffin oil, hydrogen gas, and ammonia borane upon laser heating to ∼3000 K at 51, 45 and 38 GPa, respectively. Room-temperature decompression leads to gradual reduction and eventually the complete loss of hydrogen at ambient conditions. Isostructural hP3-NdHx and hP3-GdHx hydrides were synthesized from Nd and Gd metals and paraffin oil, suggesting that the hP3-Y structure type may be common for rare-earth elements. Our results expand the list of allotropes of trivalent lanthanides and their hydrides and suggest that they should be considered in the context of studies of HP behavior and properties of this broad class of materials.