A nonlinear harmonic generation system is provided. The nonlinear harmonic generation system includes a waveguide channel receives and propagates electromagnetic signals. A resonant cavity is coupled to the waveguide channel. The resonant cavity structure includes a plurality of resonant modes into which electromagnetic energy is coupled during the operation of the system. One of the resonant modes includes a resonant frequency that changes during operation of the system to reach either an input-signal frequency or a harmonic frequency for a majority of the time in which harmonic generation is occurring. Both reflected and harmonic fields are emitted back into the waveguide channel so as to allow efficient harmonic generation at a specified critical input power.
 This invention was made with government support awarded by the U.S. Army Research Office under Contract No. W911NF-07-D-004 and the Department of Energy Computational Science Fellowship under Contract No. DE-FG02-97ER25308. The government has certain rights in the invention.