In this study, salt bath nitrocarburizing was applied on austenitic stainless steel AISI 304L to stabilize austenite at the surface exposed to cavitation attack. Samples were treated at 470 °C and 500 °C for 6 h, giving an average thickness of the nitrocarburized layer of 6 µm and 26 µm, respectively. The thickness of the nitrocarburized layer is found to influence the formation of deformation-induced martensite (DIM) in the material and, thereby, the cavitation erosion resistance. The mass loss vs. time plot shows that the nitrocarburized specimens performed significantly better than the base material under ultrasonic vibratory cavitation erosion test (ASTM G32). Cross-sectional micrographs show that the phenomenon responsible for the failure in the base material is the formation of DIM. The specimen, nitrocarburized at 470 °C, showed a reduction of about 90 % in mass loss when compared to the base material (AISI 304L SS), owing to a higher yield strength (/resilience) after the formation of more stable austenite.