The development of high-power gyrotrons (118 GHz, 140 GHz) in continuous-wave (CW) operation for heating nuclear fusion plasmas has been in progress for several years in a joint collaboration between different European research institutes and industrial partners. The 140-GHz gyrotron being under development for the installation at the W7-X stellarator now under construction at the IPP Greifswald, Germany, operates in the TE28,8 mode and is equipped with a diode type magnetron injection electron gun, an improved beam tunnel, a high mode-purity low-Ohmic loss cavity, an optimized nonlinear up-taper, a highly efficient internal quasi-optical mode converter, a single-stage depressed collector and An edge-cooled, single disk CVD-diamond window. RF measurements at pulse duration of a few milliseconds yielded an RF output power of 1.15 MW at a beam current of 40 A and a beam voltage of 84 W. Depressed collector operation has been possible up to decelerating voltages of 33 kV without any reduction of the output power. Long pulse operation (10 s at 1 MW) was possible without any signs of a limitation caused by the tube. For this output power the efficiency of the tube could be increased from about 30% without to about 50% with depression voltage. The best performance reached so far has produced an energy per pulse as high as 90 MJ (power 0.64 MW, pulse length 140 s) which is the highest value achieved in gyrotrons operating at this frequency and power level. The pulse-length limitations so far are mainly due to the external system.