We report the design and experimental demonstration of a frequency tunable terahertz gyrotron at 527 GHz built for an 800-MHz dynamic nuclear polarization enhanced nuclear magnetic resonance (DNP-NMR) spectrometer. The gyrotron is designed at the second harmonic (ω = 2ω c ) of the electron cyclotron frequency. It produces up to 9.3-W continuous microwave (CW) power at 527.2-GHz frequency using a diode type electron gun operating at V = 16.65 kV, I b = 110 mA in a TE 11,2,1 mode, corresponding to an efficiency of ~0.5%. The gyrotron is tunable within ~0.4 GHz by combining voltage and magnetic field tuning. The gyrotron has an internal mode converter that produces a Gaussian-like beam that couples to the HE 11 mode of an internal 12-mm i.d. corrugated waveguide periscope assembly leading up to the output window. An external corrugated waveguide transmission line system is built including a corrugated taper from 12- to 16-mm i.d. waveguide followed by 3 m of the 16-mm i.d. waveguide The microwave beam profile is measured using a pyroelectric camera showing ~84% HE 11 mode content.