Two hours of the Amduat have gates that the solar boat of Ra must pass each night. In the fourth hour the solar bark is towed along a zig zag path that (in the tomb of Tuthmose III) has two gates that must be passed. These gates are called "knives".
The eighth hour is divided into five "caverns" or vaults by six gates. (also named "knives") There are three guardians in each cavern. In this hour the boat is towed by eight gods. In the fourth hour, there were four gods towing the boat, while in the Twelfth hour there are twelve gods fulfilling this task.
In the Seventh hour, there is a different obstacle to overcome. It is here that Ra's greatest enemy, Apopis, tries to attack the solar bark. In the middle register of the scene representing this hour, this evil god dries up the water that the sun god's boat is floating on and Ra can only proceed through the magic of Isis and the "eldest magician" and by the magical power that is in the mouth of Ra himself. Selkis places fetters on the body of Apopis while Isis and the "eldest magician" cast spells on the snake body of Apopis. Ra is shown in this hour as surrounded by a "Mehen" serpent that also helps protect him from Apopis.
In the lower register of this hour, the stars are shown (as human figures, both male and female) with stars on their heads as they proceed in front of Ra. In the upper register, the enemies of Osiris are punished. They are bound (elbows together) and then decapitated.
(See: Abt, Theodor and Erik Hornung.
Knowledge for the Afterlife: the Egyptian Amduat - a Quest for Immortality, Zurich: Living Human Heritage Publications, 2003).