Periodic arrays of magnetic structures with micrometrer and submicrometer lateral sizes have been prepared at the surface of an austenitic stainless steel by means of local deformation using a nanoindenter. This method takes advantage of the phase transformation (from nonmagnetic fee austenite to ferromagnetic bet martensite) which occurs in this material upon plastic deformation. The local character of the induced ferromagnetism is confirmed by magneto-optical Kerr- effect measurements together with magnetic force microscopy imaging. The generated ferromagnetism can be subsequently erased by subjecting the deformed steel to annealing processes at temperatures above the reverse, martensite-to-austenite, phase transformation temperature. © 2006 American Institute of Physics.