Process for hydrotreating a heavy hydrocarbon fraction containing asphaltenes, sediments, sulphur-containing, nitrogen-containing and metallic impurities, in which the feed of hydrocarbons and hydrogen is passed, under hydrotreating conditions, over a hydrotreating catalyst, in at least two fixed bed hydrotreating guard zones each containing at least one catalyst bed, the guard zones being arranged in series to be used cyclically, consisting of successive repetition of steps b), c) and c') defined below: - a step a) during which the feed passes through all the guard zones during a fraction of the deactivation time and/or clogging time of the first guard zone brought into contact with the feed, - a step a') during which a portion of the feed continues to pass through the first guard zone brought into contact with the feed and another portion of the feed is introduced into the next guard zone downstream for a period at most equal to the deactivation time and/or clogging time of the first guard zone brought into contact with the feed, - a step b) during which the deactivated and/or clogged guard zone is bypassed and the catalyst that it contains is regenerated and/or replaced with fresh catalyst and during which the other guard zone(s) are used, - a step c) during which the feed passes through all the guard zones, the guard zone of which the catalyst was regenerated during the preceding step being reconnected so as to be downstream of all the other guard zones and said step being continued for a fraction of the deactivation time and/or clogging time of the first guard zone brought into contact with the feed, - a step c') during which a portion of the feed continues to pass through the first guard zone brought into contact with the feed and another portion of the feed is introduced into the next guard zone downstream for a period at most equal to the deactivation time and/or clogging time of the first guard zone brought into contact with the feed. - a step a) during which the feed passes through all the guard zones during a fraction of the deactivation time and/or clogging time of the first guard zone brought into contact with the feed, - a step a') during which a portion of the feed continues to pass through the first guard zone brought into contact with the feed and another portion of the feed is introduced into the next guard zone downstream for a period at most equal to the deactivation time and/or clogging time of the first guard zone brought into contact with the feed, - a step b) during which the deactivated and/or clogged guard zone is bypassed and the catalyst that it contains is regenerated and/or replaced with fresh catalyst and during which the other guard zone(s) are used, - a step c) during which the feed passes through all the guard zones, the guard zone of which the catalyst was regenerated during the preceding step being reconnected so as to be downstream of all the other guard zones and said step being continued for a fraction of the deactivation time and/or clogging time of the first guard zone brought into contact with the feed, - a step c') during which a portion of the feed continues to pass through the first guard zone brought into contact with the feed and another portion of the feed is introduced into the next guard zone downstream for a period at most equal to the deactivation time and/or clogging time of the first guard zone brought into contact with the feed.