Transition metal oxides (TMOs) are complex electronic systems which exhibit a multitude of collective phenomena. Two archetypal examples are VO2 and NdNiO3, which undergo a metal-insulator phase-transition (MIT), the origin of which is still under debate. Here we report the discovery of a memory effect in both systems, manifest through an increase of resistance at a specific temperature, which is set by reversing the temperature-ramp from heating to cooling during the MIT. The characteristics of this ramp-reversal memory effect do not coincide with any previously reported history or memory effects in manganites, electronglass or magnetic systems. From a broad range of experimental features, supported by theoretical modelling, we find that the main ingredients for the effect to arise are the spatial Submitted to 22222222224222 phase-separation of metallic and insulating regions during the MIT and the coupling of lattice strain to the local critical temperature of the phase transition. We conclude that the emergent memory effect originates from phase boundaries at the reversal-temperature leaving "scars" in the underlying lattice structure, giving rise to a local increase in the transition temperature.The universality and robustness of the effect shed new light on the MIT in complex oxides.TMOs are a hallmark example of complex electron systems; the competition between charge, spin, strain, lattice, oxidation and other degrees of freedom, having similar energy scales, give rise to numerous collective phenomena [1][2][3] including superconductivity, [4] colossal magnetoresistance [5] and metal-insulator transitions (MIT). [6] In many thin film TMOs which exhibit a temperature (T)-driven phase transition, complexity is manifest through the coexistence of multiple phases where a single phase is expected, [7][8][9][10][11] providing the setting required for emergent phenomena to develop.[1]An intriguing feature found in many of the systems that exhibit the aforementioned phenomena, is the appearance of internal memory, where the system's properties (e.g. resistance or magnetization) depend on the measurement history. Such memory effects appear in various forms and measurement settings, having very different microscopic origins, many of which are still poorly understood. Examples include dynamical memory and slow relaxation in electron-glass systems such as amorphous oxides, [12,13] spatially phase-separated memory in colossal-magnetoresistance manganites, [14] shape-memory in martensitic alloys, [15] and more. [16,17] Here we report the appearance of an unexpected memory effect within the MIT in two prototypical examples of complex TMOs, namely VO2 and NdNiO3 (NNO). The characteristics of the observed effect differ substantially from those of previously reported memory effects, indicating a different microscopic origin.VO2 and NNO both exhibit an MIT, however its features and microscopic origin are quite different. In VO2 the MIT occurs above room temperature, ~340 K, and is accompanied by a structural transition from...