A
quaternary nitrogen-containing
corrosion inhibitor of formulawhereinis an aromatic,
nitrogen-containing ring of 5 to 14 ring atoms, optionally containing an additional N, O or S ring atom and optionally substituted with one or more
alkyl, alkenyl,
aryl, arylalkyl, cycloalkyl, amino, aminoalkyl, alkoxy, hydroxylalkyl, or cyano groups, or a mixture thereof, Y is a group of formula —OC(O)R1 or —C(O)R1; L is C1-C10
alkyl, C2-C10 alkenyl or a group of formula CH2CH(OR2)CH2—; R1 is C8-C20
alkyl or C8-C20 alkenyl; R2 is H or C(O)R1; R3 and R4 are independently selected from H, alkyl, alkenyl, amino, alkoxy, hydroxylalkyl and cyano; and X is Br, Cl or I is particularly useful for inhibiting
corrosion in oil and gas field applications.