The present invention relates in particular to a composition comprising in a cosmetically acceptable medium: (a) one or more ammonium salts of an inorganic acid or an organic acid having from 1 to 7 carbon atoms, (b) aqueous ammonia, and (c) one or more basic amino acids. wherein the basic amino acid(s) are present in an amount ranging from 0.5 to 10% by weight, relative to the total weight of the cosmetic composition The present invention also relates to a method for dyeing, bleaching or lightening keratin fibres using this composition and a device containing it.