Dyeing nylon by applying sulphonated or unsulphonated dyestuffs containing cyclic anhydride groups, anhydride forming dicarboxylic acid groups or half-esters or half-amides thereof, as free acids or as salts with ammonia or volatile amines, and heating the fibre until dyestuff fixation takes place.