Polyaniline film could not be obtained on mild steel by direct electrooxidation of aniline in LiClO4 containing acetonitrile medium (ACN-LiClO4), because sufficient passivity of the surface could not be provided. This non-passivated metal undergoes intense dissolution, in potential region at which the monomer oxidation happens and this event prevents the formation of stable polymer film on the surface. Therefore, the electrode surface was coated with very thin polyaniline (PANi), polypyrrole (PPy) primer coatings, in monomer containing aqueous oxalic acid solution, and then the synthesis of top PANi film was achieved in aniline containing ACN-LiClO4 successfully. The corrosion behavior of PANi/PANi and PPy/PANi coated MS samples were investigated in 3.5% NaCl solution, properly. For this aim, anodic polarization curves and open circuit potential-time (E-ocp-t) variation and electrochemical impedance spectroscopy (EIS) techniques were used. It was shown that PPy/PANi coating could provide much better protection for longer periods than PANi/PANi coating against the corrosion of MS. This behavior was explained with better barrier property of PPy/PANi. After 240 h of immersion time in corrosive test solution, the protection efficiency value was 97.0%, for PPy/PANi coated electrode. (C) 2004 Elsevier B.V. All rights reserved.