The Nightly Combat with Apophis
Every single night, a serpent tries to swallow the sun — and must be defeated before dawn.
Also: Apophis · Apep · Apopis · serpent of chaos · Book of Overthrowing Apophis · Bremner-Rhind · sun and serpent
Egyptians believed that every night, as the sun travelled through the underworld, a vast serpent of chaos named Apophis tried to stop it and devour it. The sun god and his crew — including, in this role, the god Seth — fought and subdued the serpent so the sun could rise again at dawn. Temples even performed rituals to help defeat Apophis. The combat expressed the constant effort needed to keep chaos (isfet) from overwhelming order.
In short
The recurring mythic battle in which the sun god (with his defenders, notably Seth in this role) overcomes Apophis (Apep), the great serpent of chaos who threatens to swallow the sun each night, ensuring the dawn and the continuance of order.
Where it’s found
New Kingdom Netherworld Books; the Late Period 'Book of Overthrowing Apophis' (Papyrus Bremner-Rhind)
How the idea developed across Egypt
The chaos-serpent and the nightly threat appear in the New Kingdom Netherworld Books; an explicit anti-Apophis ritual text survives in the Late Period 'Book of Overthrowing Apophis' (e.g. Papyrus Bremner-Rhind).
Apophis is a mythic being (the chaos-serpent), not a person — distinct from the Hyksos king named Apophis (Apepi), who belongs to the sage roster. Keep the two strictly apart.