Measurements of synchrotron radiation emitted by 30-MeV runaway electrons in the TEXTOR-94 tokamak show that the runaway population decays after switching on neutral beam injection (NBI). The decay starts only with a significant delay, which decreases with increasing NBI heating power. This delay provides direct evidence of the energy dependence of runaway confinement, which is expected if magnetic modes govern the loss of runaways. Application of the theory by Mynick and Strachan [Phys. Fluids 24, 695 (1981)] yields estimates for the "mode width" (delta) of magnetic perturbations: delta<0.5 cm in Ohmic discharges, increasing to delta = 4.4 cm for 0. 6 MW NBI.