Phosphorus (P) is considered a possible light element alloying with iron (Fe) in the Earth's core due to its siderophile nature and the ubiquity of P-bearing iron alloys in iron meteorites. The sequestration of P by liquid metals during the core formation possibly results in the relatively low concentration of P in the bulk silicate Earth. In this study, we performed single-crystal and powder X-ray diffraction, synchrotron Mössbauer spectroscopy and nuclear resonant inelastic X-ray scattering measurements in diamond anvil cells to investigate the elastic and magnetic properties of Fe3P under high pressures. Our X-ray diffraction results suggest that there is no structural phase transition up to 111 GPa. However, a volume collapse was observed at 21.5 GPa in Fe3P, ascribed to a magnetic transition as evidenced by synchrotron Mössbauer spectroscopy results. Fitting the volume-pressure data by the Birch-Murnaghan equation of state gives bulk modulus KT0=162.4(7) GPa, its first pressure derivative KT0′=4.0 (fixed) and zero-pressure volume V0=370.38(6) Å3 for the magnetic phase and KT0=220(7) GPa, KT0′=4.0 (fixed) and V0=357(1) Å3 for the non-magnetic phase. Sound velocities of Fe3P were determined up to 152 GPa by nuclear resonant inelastic X-ray scattering, demonstrating that Fe3P bears a low shear velocity and high Poisson's ratio at core pressures compared to Fe and Fe3S. When forming a solid solution Fe3(S,P) with Fe3S at core pressures, Fe3P may favorably influence the elastic properties of Fe3(S,P) to match the seismic observations of the inner core.