We present a combination of first-principles and experimental results regarding the structural and magnetic properties of olivine-type LiFePO$_4$ under pressure. Our investigations indicate that the starting $Pbnm$ phase of LiFePO$_4$ persists up to 70 GPa. Further compression leads to an isostructural transition in the pressure range of ~70-75 GPa, inconsistent with a former theoretical study. Considering our first-principles prediction for a high-spin to low-spin transition of Fe$^{2+}$ close to 72 GPa, we attribute the experimentally observed isostructural transition to a change on the spin state of Fe$^{2+}$ in LiFePO$_4$. Compared to relevant Fe-bearing minerals, LiFePO$_4$ exhibits the largest onset pressure for a pressure-induced spin state transition.