The invention relates to a hair dyeing process comprising: the application to the hair of a composition comprising a maleic anhydride ethylenic polymer and of an amine compound chosen from polyamine compounds bearing several primary amine and/or secondary amine groups and amino alkoxysilanes, and of at least one pigment the ethylenic polymer being derived from the polymerization of: (a) 45% to 95% by weight, relative to the total weight of monomers, of an ethylenic monomer bearing an at least Cs linear or branched alkyl group; (b) 5% to 25% by weight of maleic anhydride; (c) 0 to 50% by weight of additional monomer; the compositions used being anhydrous when the amine compound is an amino alkoxysilane.