In 1989 the planning for a 140-GHz, 2-MW, 2-s electron cyclotron resonance heating system for ASDEX Upgrade started. These plans were finally approved in 1993. The system comprises four gyrotrons with four separate transmission lines and launchers. Although a 0.5-s test gyrotron was already installed in autumn 1994, it was only in summer 1997 when the first gyrotron of the final system was ready for use in the experiments, and in spring 2000 the system was completed with all four gyrotrons. This paper reviews the experience gained in construction and operation of this system. In particular, we describe how we solved problems with external magnetic fields affecting gyrotron operation. These fields originate both from the tokamak and from the cryomagnet of adjacent gyrotrons. We also report about the gyrotron performance, our techniques for the alignment of the transmission lines, the calibration of the polarizer mirrors, and the power calibration.