Method for preparing an anionic polyelectrolyte including up to 95 mol % of monomer units from 2-methyl 2-[(1-oxo 2-propenyl) amino] 1-propanesulfonic acid that is totally salified in the form of sodium salt, up to 90 mol % of at least one neutral monomer, and optionally up to 10 mol % of at least one monomer of formula (I): where: R1 is a hydrogen atom or a methyl radical, R is an alkyl radical, and n is a number greater than or equal to 1 and less than or equal to 50, the method including: a) preparing a reaction mixture containing, in a solvent (S), 2-methyl 2-[(1-oxo 2-propenyl) amino] 1-propanesulfonic acid, the neutral monomer(s), the neutralizing agent, and optionally, the monomer(s) of formula (I); and b) polymerizing the reaction mixture. The polyelectrolyte can be used as a thickening and/or stabilizing and/or emulsifying agent for a cosmetic, dermopharmaceutical or pharmaceutical topical composition.