The thermal structure of the Earth's lowermost mantle--the D'' layer spanning depths of approximately 2,600-2,900 kilometres--is key to understanding the dynamical state and history of our planet. Earth's temperature profile (the geotherm) is mostly constrained by phase transitions, such as freezing at the inner-core boundary or changes in crystal structure within the solid mantle, that are detected as discontinuities in seismic wave speed and for which the pressure and temperature conditions can be constrained by experiment and theory. A recently discovered phase transition at pressures of the D'' layer is ideally situated to reveal the thermal structure of the lowermost mantle, where no phase transitions were previously known to exist. Here we show that a pair of seismic discontinuities observed in some regions of D'' can be explained by the same phase transition as the result of a double-crossing of the phase boundary by the geotherm at two different depths. This simple model can also explain why a seismic discontinuity is not observed in some other regions, and provides new constraints for the magnitude of temperature variations within D''.