High-pressure X-ray diffraction studies of cubic close-packed γ′-Fe4N and hexagonal close-packed -Fe7N3 have been performed to pressures of 51 GPa in order to constrain the elastic properties and phase transitions of these materials under the pressures of the Earth's interior. The ɛ-Fe7N3 phase remains stable to the highest pressures of these measurements, with a bulk modulus (K) of 168(10) GPa and a (K′) of 5.7(1.5). Fe4N appears to undergo a phase transition to either a hexagonal crystalline structure similar to that of Fe7N3 or may disorder by 32.4 GPa. The bulk modulus of γ′-Fe4N up to this pressure is 155(3) GPa, with K′ assumed to be 4. Both volume and Gibbs free energy calculations indicate that between these two nitride phases, the hexagonal close-packed phase is more stable under deep Earth conditions. The amount of nitrogen in iron meteorites indicates that significant quantities of nitrogen (of order 0.5 wt %) could have been incorporated in Earth's core during accretion. Since iron meteorites are derived from the core material of differentiated bodies in the early solar system, nitrogen is likely a component of the light alloying elements in the Earth's core. If nitrogen partitions preferentially into interstitial sites within ɛ-Fe relative to liquid, than the abundance of nitrogen in meteorites implies that N could be the primary light alloying component in Earth's inner core. The elastic properties of ɛ-Fe7N3 extrapolated to inner core conditions are found to meet the primary criteria for a light alloying component of the inner core: It is both less dense than, and approximately as compressible as, ɛ-Fe. Indeed, we document that the elasticity of nitrogen-bearing iron compounds is quite similar to that of end-member iron. However, the anisotropy of Fe7N3 on compression is substantially greater than that of ɛ-Fe, with its a axis being substantially more compressible than its c axis. Thus a mixture of iron and iron nitride (or a solid solution between the two) in the inner core could easily generate the observed anisotropy of this body.