In crude oil desalters, water washing generates a highly saline aqueous phase (rich in Cl- /HCl), creating a corrosive environment where exposed carbon steel is prone to pitting once coating failures occur. Magnesium sacrificial anodes leverage magnesium’s significantly more negative electrochemical potential compared to steel, forming a galvanic cell.