Heating a solid sphere at its surface induces mechanical stresses inside the sphere. If a finite amount of heat is supplied, the stresses gradually disappear as temperature becomes homogeneous throughout the sphere. We show that before this happens, there is a temporary lowering of pressure and density in the interior of the sphere, inducing a transient lowering of the temperature here. For ordinary solids this effect is small because cp≅cV. For fluent liquids the effect is negligible because their dynamic shear modulus vanishes. For a liquid at its glass transition, however, the effect is generally considerably larger than in solids. This paper presents analytical solutions of the relevant coupled thermoviscoelastic equations. In general, there is a difference between the isobaric specific heat cp measured at constant isotropic pressure and the longitudinal specific heat cl pertaining to mechanical boundary conditions that confine the associated expansion to be longitudinal. In the exact treatment of heat propagation, the heat-diffusion constant contains cl rather than cp. We show that the key parameter controlling the magnitude of the “cooling-by-heating“ effect is the relative difference between these two specific heats. For a typical glass-forming liquid, when the temperature at the surface is increased by 1 K, a lowering of the temperature at the sphere center of the order of 5 mK is expected if the experiment is performed at the glass transition. The cooling-by-heating effect is confirmed by measurements on a glucose sphere at the glass transition.