Effect of grain refinement and heat treatment on corrosion behavior of a friction stir processed Mg-Y-RE alloy was studied. The ennoblement of pitting potential by ∼250. mV vs. SCE of processed samples as compared to parent alloy was attributed to grain refinement and uniform second phase distribution as a result of friction stir processing. Lower currents and positive open circuit potentials were observed in friction stir processed samples under free corroding conditions. Friction stir processing prior to peak hardening resulted in improved pitting potential when compared to the peak aged and processed samples. Electrochemical testing and constant immersion testing showed differing trends. © 2012 Elsevier Ltd.