We report on THz emission measurements and low temperature scanning laser imaging of Bi_2Sr_2CaCu_2O_8 intrinsic Josephson junction stacks. Coherent emission is observed at large dc input power, where a hot spot and a standing wave, formed in the cold part of the stack, coexist. By varying the hot spot size the cavity resonance frequency and the emitted radiation can be tuned. The linewidth of radiation is much smaller than expected from the quality factor of the cavity mode excited. Thus, an additional mechanism of synchronization seems to play a role, possibly arising from nonequilibrium processes at the hot spot edge.