An in-situ study of cubanite, CuFe2S3, was performed in a diamond-anvil cell using Mössbauer spectroscopy and energy-dispersive X-ray diffraction at room temperature and pressures up to 5 GPa. Mössbauer spectra of orthorhombic cubanite show a single Fe site with rapid electron transfer between Fe2+ and Fe3+, a hyperfine magnetic field that is relatively insensitive to pressure, and a center shift that decreases with pressure because of increasing covalency. A phase transition occurs above 3.3 GPa that involves a change from the orthorhombic cubanite structure to a derivative of the hexagonal NiAs (B8) structure, with a zero-pressure volume decrease of 29%. The large difference in volume is caused by a change from tetrahedral to octahedral coordination and a significant shortening of metal-metal bonds. Volume-compression data were fitted to a second-order Birch-Mumaghan equation of state with the results K0 = 64 ± 3 GPa (orthorhombic phase) and K0 = 157 ± 16 GPa (high-pressure phase). Mössbauer data of the high-pressure phase indicate a single Fe site with no magnetic ordering and a valence intermediate between Fe2+ and Fe3+. Consideration of likely ordering patterns in the high-pressure phase indicates that localized electron transfer could occur along face-shared pairs of Fe octahedra, and extended electron delocalization could occur along paths formed by face- and edge-shared octahedra.