Small lateral variations in the velocity or boundaries of a buried low-velocity layer allow far-field seismic energy incident on the layer to be scattered into the wave guide modes of the layer, something which cannot occur in the case of lateral homogeneity. The energy trapped by this resonance mechanism can be much greater than the energy trapped by multiple reflections within a similar laterally homogeneous layer. The energy trapped in the wave guide modes can leak only slowly out of the layer by again interacting with the lateral inhomogeneities. Finite difference simulations of this effect for SH waves clearly show the excitation of the mode structure within the layer caused by scattering from the lateral perturbations. They also show the energy slowly leaking out of the layer and making a large contribution to the coda of the signal recorded at the surface. This phenomenon may contribute significantly to the coda of body waves which have interacted with low-velocity zones in the crust and surface sediments.