The invention relates to a process for dyeing keratin fibers, in which said fibers are treated: ▪ with a composition (A) comprising i) one or more indole or indoline compounds ii) one or more metal salts iii) hydrogen peroxide or one or more systems that generate hydrogen peroxide and then ▪ with a composition (B) comprising iv) one or more basifying agents. The invention also relates to a hair dyeing process for obtaining better colorations, which are more uniform, chromatic and remanent and which do not impair the cosmetic properties of keratin fibers.