We report mode locking in lasers integrated with semiconductor optical amplifiers, using either conventional or phase-shifted sampled grating distributed Bragg reflectors (DBRs). For conventional sampled gratings with a continuous grating coupling coefficient of ∼80 cm−1, mode locking was observed at a fundamental frequency of 628 GHz and second harmonic of 1.20 THz. The peak output power was up to 142 mW. In the phase-shifted sampled grating design, the grating is present along the entire length of the reflector with π-phase-shifted steps within each sampled section. The effective coupling coefficient is, therefore, increased substantially. Although the continuous grating coupling coefficient for the phase-shifted gratings was reduced to ∼23 cm−1 because of a different fabrication technology, the lasers demonstrated mode locking at fundamental repetition frequencies of 620 GHz and 1 THz, with a much lower level of amplified spontaneous emission seen in the output spectra than from conventional sampled grating devices. High pulse reproducibility and controllability over a wide operation range was seen for both types of grating, but the π-phase-shifted gratings already demonstrate fundamental mode locking to 1 THz. The integrated semiconductor optical amplifier makes sampled grating DBR lasers ideal pump sources for generating terahertz signals through photomixing.