The Cherenkov excitation of THz radiation by periodic succession of electron bunches in a dielectric lined resonator is investigated. A TM mode of the resonator, that comprises forward and backward moving slow waves, is resonantly excited by the electron bunches when the bunches are in near phase synchronism with the forward wave. The THz wave amplitude rises with successive bunches. Each drive bunch loses a significant amount of energy per unit length about 20%. For suitable parameters, the energy conversion efficiency to THz can exceed 10%.