Two crystalline phases of aniline have been investigated by a combination of single crystal X-ray diffraction data on aniline-h7 and neutron powder diffraction data on aniline-d7. Phase-I, which is formed on cooling the liquid at ambient pressure, is monoclinic (P21Ic). Orthorhombic (Pna21) phase-II was crystallised at 0.84 GPa at room temperature and structurally characterised at pressures up to 7.3 GPa. The strongest intermolecular interactions in both structures are NH···π contacts and NH···N H-bonds. These interactions occur within layers in both phases, and the phases differ in the way the layers are stacked. The structures of both phases have been obtained under two sets of identical conditions, at 0.84 GPa and 0.35 GPa and studied at room temperature by neutron powder and X-ray single-crystal diffraction. At 0.84 GPa phase-II is the thermodynamically stable form because it has a lower molar volume than phase-I, but as the pressure is reduced the volume of phase-I becomes less than that of phase-II, and at 0.35 GPa phase-II partially transformed into phase-I. PIXEL calculations indicate that the intermolecular interaction energy for pairs of molecules connected by H-bonds is -9 to -16 kJ mol-1 in phase-I and II at 0.84 GPa, but one of these becomes destabilising in phase-II at 7.3 GPa, with an energy of +1 kJ mol-1, making it similar to several compressed CH center···π contacts. The results demonstrate how the hierarchy of intermolecular interaction energies can be manipulated with pressure, driving a H-bond beyond its ambient-pressure distance limit into repulsive region of its potential, and trapping it within a compressed crystal structure.