An improved model of the generation and propagation of cyclotron-maser radiation in flaring loops is discussed, which incorporates competition between driving of the maser instability and maser-induced relaxation of the unstable plasma. This model enables previous large discrepancies between the build-up, relaxation, and observed timescales to be resolved for solar microwave spike bursts. Also, it implies that emission via fundamental o-mode and second-harmonic x-mode instabilities can compete more effectively against fundamental x-mode emission than has previously been thought. Propagation of the radiation to the observer is discussed both theoretically and with reference to ray tracing calculations and it is shown that the observed levels of MHD waves in the corona make it significantly easier for the radiation to escape than in the unperturbed case. In the absence of nonlinear processes or mode conversion we argue that the escaping radiation is generated by either fundamental o-mode or second-harmonic x-mode instabilities.