  During the epoch of reionisation the first galaxies were enshrouded in
pristine neutral gas, with one of the brightest emission lines in star-forming
galaxies, Lyman-$\alpha$ (Ly$\alpha$), expected to remain undetected until the
Universe became ionised. Providing an explanation for the surprising detection
of Ly$\alpha$ in these early galaxies is a major challenge for extra-galactic
studies. Recent JWST observations have reignited the debate on whether
residence in an overdensity of galaxies is a it sufficient and necessary
condition for Ly$\alpha$ to escape. Here, we take unique advantage of both
high-resolution and high-sensitivity images from the JWST instrument NIRCam to
reveal that all galaxies in a sample of z>7 Ly$\alpha$ emitters have close
companions. We exploit novel on-the-fly radiative transfer
magnetohydrodynamical simulations with cosmic ray feedback to show that
galaxies with frequent mergers have very bursty star formation which drives
episodes of high intrinsic Ly$\alpha$ emission and facilitates the escape of
Ly$\alpha$ photons along channels cleared of neutral gas. We conclude that the
rapid build up of stellar mass through mergers presents a compelling solution
to the long-standing puzzle of the detection of Ly$\alpha$ emission deep into
the epoch of reionisation.
