Direct collapse black holes forming in pristine, atomically cooling haloes at z ≈ 10–20 may act as the seeds of supermassive black holes (BHs) at high redshifts. In order to create a massive BH seed, the host halo needs to be prevented from forming stars. H2 therefore needs to be irradiated by a large flux of Lyman–Werner (LW) UV photons in order to suppress H2 cooling. A key uncertainty in this scenario is the escape fraction of LW radiation from first galaxies, which is the dominant source of UV photons at this epoch. To better constrain this escape fraction, we have performed radiation-hydrodynamical simulations of the growth of H II regions and their associated photodissociation regions in the first galaxies using the ZEUS-MP code. We find that the LW escape fraction crucially depends on the propagation of the ionization front (I-front). For an R-type I-front overrunning the halo, the LW escape fraction is always larger than 95 per cent. If the halo recombines later from the outside-in, due to a softened and weakened spectrum, the LW escape fraction in the rest frame of the halo (the near-field) drops to zero. A detailed and careful analysis is required to analyse slowly moving, D-type I-fronts, where the escape fraction depends on the microphysics and can be as small as 3 per cent in the near-field and 61 per cent in the far-field or as large as 100 per cent in both the near-field and the far-field.