Recently, it has been found that, when operated at large input power, the linewidth f of terahertz radiation emitted from intrinsic Josephson junction stacks can be as narrow as some megahertz. In this high-bias regime, a hot spot coexists with regions which are still superconducting. Surprisingly, f was found to decrease with increasing bath temperature. We present a simple model describing the dynamics of the stack in the presence of a hot spot by two parallel arrays of pointlike Josephson junctions and an additional shunt resistor in parallel. Heat diffusion is taken into account by thermally coupling all elements to a bath at temperature T b . We present current-voltage characteristics of the coupled system and calculations of the linewidth of the radiation as a function of T b . In the presence of a spatial gradient of the junction parameters' critical current and resistance, f deceases with increasing T b , similar to the experimental observation.