Micro-arc oxidation of AZ91D magnesium alloy was studied in solutions containing NaAlO_2 and KF at a constantly applied current density.The experimental phenomenon that occurred at the anode surface was analyzed.The effect of constituents and concentration of electrolyte on coating thickness was also investigated.SEM was employed to examine the surface morphology.Polarization curve and EIS were used to evaluate the corrosion resistance of ceramic coatings formed on magnesium alloys.It was concluded that sparks could be seen at the anode surface when the electrolyte only contained NaAlO_2 and a thin silver gray film was formed at the anode surface.An increase of the coating thickness was not evident even with an increase of the NaAlO_2 content.However,the addition of KF increased the coating thickness considerably and a line function was built up between the coating thickness and KF content.A few pores and micro cracks were observed on the ceramic coating surface when the concentration of electrolyte was increased.The corrosion resistance of ceramic coatings was improved considerably compared to magnesium alloy substrate.