The Lyman-alpha (Lya) emission line is the primary observational signature of star-forming galaxies at the highest redshifts, and has enabled the compilation of large samples of galaxies with which to study cosmic evolution. The resonant nature of the line, however, means that Lya photons scatter in the neutral interstellar medium of their host galaxies, and their sensitivity to absorption by interstellar dust may therefore be enhanced greatly. This implies that the Lya luminosity may be significantly reduced, or even completely suppressed. Hitherto, no unbiased empirical test of the escaping fraction (f_esc) of Lya photons has been performed at high redshifts. Here we report that the average fesc from star-forming galaxies at redshift z = 2.2 is just 5 per cent by performing a blind narrowband survey in Lya and Ha. This implies that numerous conclusions based on Lya-selected samples will require upwards revision by an order of magnitude and we provide a benchmark for this revision. We demonstrate that almost 90 per cent of star-forming galaxies emit insufficient Lya to be detected by standard selection criteria. Both samples show an anti-correlation of fesc with dust content, and we show that Lya- and Ha-selection recovers populations that differ substantially in dust content and fesc.