Friction stir keyholeless spot welding(FSKSW) using a retractable pin for 1.0 mm thick galvanized mild steel and 3 mm thick AZ31 B magnesium alloy in a lap configuration was investigated.The process variables were optimized in terms of the joint strength.The effects of the stacking sequence on joint formation and the joining mechanism of FSKSW AZ31B-to-mild steel joints were also analyzed.It shows that the process window and joint strength are strongly influenced by the stacking sequence of the workpieces.While the process window is narrow and unstable for FSKSW of a magnesium-to-steel stack-up,a desirable process was established for the steel-to-magnesium stacking sequence,a desirable process and higher strength joint can be got when the steel-to-magnesium stacking sequence.XRD phase and EPMA analyses of the FSKSW joint showed that the intermetallic compounds are formed at the steel-to-magnesium interface,and the element diffusion between the mild steel and AZ31 B magnesium alloy revealed that the joining methods for FSKSW joints is the main mechanical joining along with certain metallurgical bonding.