The crystal structure of the excitonic insulator Ta 2 NiSe 5 has been investigated under a range of pressures, as determined by the complementary analysis of both single-crystal and powder synchrotron X-ray diffraction measurements. The monoclinic ambient-pressure excitonic insulator phase II transforms upon warming or under a modest pressure to give the semiconducting C-centred orthorhombic phase I. At higher pressures (i.e. >3 GPa), transformation to the primitive orthorhombic semimetal phase III occurs. This transformation from phase I to phase III is a pressure-induced first-order phase transition, which takes place through coherent sliding between weakly coupled layers. This structural phase transition is significantly influenced by Coulombic interactions in the geometric arrangement between interlayer Se ions. Furthermore, upon cooling, phase III transforms into the monoclinic phase IV, which is analogous to the excitonic insulator phase II. Finally, the excitonic interactions appear to be retained despite the observed layer sliding transition.