A process for an anticorrosion pretreatment of a metallic surface comprising steel, galvanized steel, aluminum, magnesium and/or a zinc-magnesium alloy, wherein the metallic surface is brought into contact with an aqueous composition A comprising
- a) from 0.01 to 0.5 g/l (calculated as solid addition) of at least one copolymer comprising, in an alternating configuration, i) monomer units comprising at least one carboxylic acid group, phosphonic acid group and/or sulfonic acid group and ii) monomer units not comprising any acid group,
- and the metallic surface is brought into contact with an acidic aqueous composition B comprising
- b1) at least one compound selected from the group consisting of titanium, zirconium and hafnium compounds,
- wherein the metallic surface is brought into contact
- i) firstly with the composition A and then with the composition B, or
- ii) firstly with the composition B and then with the composition A.