There is an increasing demand for pulsed all-fibre lasers with gigahertz repetition rates for applications in telecommunications and metrology. The repetition rate of conventional passively mode-locked fibre lasers is fundamentally linked to the laser cavity length and is therefore typically ~10-100 MHz, which is orders of magnitude lower than required. Cascading stimulated Brillouin scattering (SBS) in nonlinear resonators, however, enables the formation of Brillouin frequency combs (BFCs) with GHz line spacing, which is determined by the acoustic properties of the medium and is independent of the resonator length. Phase-locking of such combs therefore holds a promise to achieve gigahertz repetition rate lasers. The interplay of SBS and Kerr-nonlinear four-wave mixing (FWM) in nonlinear resonators has been previously investigated, yet the phase relationship of the waves has not been considered. Here, we present for the first time experimental and numerical results that demonstrate phase-locking of BFCs generated in a nonlinear waveguide cavity. Using real-time measurements we demonstrate stable 40 ps pulse trains with 8 GHz repetition rate based on a chalcogenide fibre cavity, without the aid of any additional phase-locking element. Detailed numerical modelling, which is in agreement with the experimental results, highlight the essential role of FWM in phase-locking of the BFC.