  Many applications of molecular layers deposited on metal surfaces, ranging
from single-atom catalysis to on-surface magnetochemistry and biosensing, rely
on the use of thermal cycles to regenerate the pristine properties of the
system. Thus, understanding the microscopic origin behind the thermal stability
of organic/metal interfaces is fundamental for engineering reliable
organic-based devices. Here, we study nickel porphyrin molecules on a copper
surface as an archetypal system containing a metal center whose oxidation state
can be controlled through the interaction with the metal substrate. We
demonstrate that the strong molecule-surface interaction, followed by charge
transfer at the interface, plays a fundamental role in the thermal stability of
the layer by rigidly anchoring the porphyrin to the substrate. Upon thermal
treatment, the molecules undergo an irreversible transition at 420 K, which is
associated with an increase of the charge transfer from the substrate, mostly
localized on the phenyl substituents, and a downward tilting of the latters
without any chemical modification
