Keratin fibers, in particular human hair and especially artificially dyed human hair, are protected against the action of atmospheric agents and especially against the action of light by application to the keratin fibers/hair of a composition containing at least one protective agent having a log P of less than or equal to 6, followed by the application to the fibers hair of a heating iron at a temperature of greater than or equal to 60° C.