Terahertz gyrotrons in harmonic operation offer the magnetic-field reduction, but they can also still easily generate various competing modes that operate at low harmonics. In this paper, an injection-locking technique for phase control and spectral purity is employed to enhance the operating modes and suppress the competing modes in gyrotrons. The simulation results, using a multi-mode time-independent code, show that gyrotrons driven by backward or forward waves cannot avoid mode competition wherever the input power increases. To avoid the fundamental harmonic competing mode, a second-harmonic gyrotron traveling-wave amplifier (gyro-TWA) with a severed section is used instead of the driven gyrotrons. The gyro-TWA operates at a slightly low external magnetic field and has a uniform interaction structure. The simulation results reveal that the fundamental harmonic TE3,5 competing mode does not occur at Ib< 4.2 A; meanwhile, the second-harmonic TE8,9-mode gyro-TWA can yield a stable output power. The amplification of waves in a gyro-TWA depends on the lengths of the sections. The simulated results, in particular, show that the output power depends on the length of the interaction section, in contrast to those of the drive or sever sections. A stable second-harmonic gyro-TWA is predicted to yield a peak output power of 6.9 kW at 888.7 GHz with an efficiency of 8%, a saturated gain of 45 dB and a bandwidth of 0.7 GHz for a 30-kV, 3-A electron beam with an axial velocity spread of 10%.