A novel 4.5-MW (90 kV, 50 A) electron gun for a 165-GHz coaxial cavity gyrotron operated in the transverse electric mode TE/sub 31, 3.7/ has been designed, fabricated, and operated in a gyrotron. The electrons are extracted toward the anode as in a conventional magnetron injection gun (MIG) and not toward the coaxial insert as in the previously used so-called inverse gun. The main advantage of this arrangement is the reduced overall radial size which becomes comparable to the size of a conventional gun with the same diameter of the emitter. The design and the technology of the electron gun fulfil the requirements for a high-power gyrotron operated at long pulses up to continuous wave. The coaxial insert is fully cooled and can be adjusted when the tube is completely assembled. The amplitude of mechanical vibrations has been measured to be less than 0.03 mm under operating conditions. This is sufficiently small for stable long-pulse operation. In operation at short pulses (ms) a microwave RF output power of 2.2 MW at 165 GHz has been obtained with a beam current of 84 A. The best operating conditions have been observed with an intermediate type of electron flow.