Linear and nonlinear theory is presented for the generation of gyroharmonic radiation from spatiotemporally modulated electron beams in cylindrical waveguides. Selection rules for axisymmetric beams are derived that show coupling at the mth temporal harmonic to be absent for all TM modes, and for TE modes other than those with an azimuthal mode index of m. Estimates from linear theory are given for the effects of spreads in axial momentum and guiding-center radius. A nonlinear multimode theory is developed in order to treat mode saturation and mode competition for TE modes in a down-tapered guide magnetic field. Numerical simulations of the multimode nonlinear generation of fifth-harmonic radiation at 94 GHz from a 150-kV, 6.667-A, alpha = 2 beam show that nearly 90% of the initial transverse energy of the beam can be converted to fifth-harmonic radiation in the TE51 mode, and that less than 2.5% of the beam energy is converted to other harmonics. Use of a linearly tapered guide magnetic field gives lower saturated fifth-harmonic conversion efficiency than does use of a nonlinear taper. But the linear-taper case shows greater resilience to axial momentum spread than does the nonlinear taper case. The spent beam is nearly monoenergetic and phase coherent at saturation, suggesting that overall harmonic-conversion efficiencies can approach 100% if a single-stage depressed collector is used to recover the spent beam energy.