As a result of the electrical conductivity of pyrrhotite, it was hypothesized that its presence in the corrosion product layer on a steel surface could lead to localized corrosion. Mild steel specimens (API 5L X65) were pretreated to form a pyrrhotite layer on the surface using high-temperature sulfidation in oil. The pretreated specimens were then exposed to a range of aqueous CO2 and H2S corrosion environments at 30°C and 60°C. X-ray diffraction data showed that the pyrrhotite layer changed during exposure; in an aqueous CO2 solution it underwent dissolution, while in a mixed CO2/H2S solution it partially transformed to troilite, with some mackinawite formation. Initiation of localized corrosion was observed in both cases. It was concluded that this was the result of a galvanic coupling between the pyrrhotite layer and the steel surface. The intensity of the observed localized corrosion varied with solution conductivity (NaCl concentration); a more conductive solution resulted in higher localized corrosion rates, consistent with the galvanic nature of the attack.