The Solar System originated in a cloud of interstellar gas and dust. The dust is in the form of amorphous silicate particles and carbonaceous dust. The composition of cometary material, however, shows that a significant fraction of the amorphous silicate dust was transformed into crystalline form during the early evolution of the protosolar nebula. How and when this transformation happened has been a question of debate, with the main options being heating by the young Sun and shock heating. Here we report mid-infrared features in the outburst spectrum of the young Sun-like star EXLupi that were not present in quiescence. We attribute them to crystalline forsterite. We conclude that the crystals were produced through thermal annealing in the surface layer of the inner disk by heat from the outburst, a process that has hitherto not been considered. The observed lack of cold crystals excludes shock heating at larger radii.