Apophis (Apep in Egyptian) was the enemy of the sun god Re and the personification of everything that was a threat to the sunlight (for example a cloud or a solar eclipse). He was a giant snake, trying to prevent the bark of Re from sailing; one myth tells us that for this purpose Apophis swallowed all the water so that the bark would run aground; in another version the coils of the snake were equated to sandbanks that obstruct the course of the bark, and thus the spreading of sunlight.
Re and Apophis were in constant battle, especially at the moment of sunrise; the vignette of Book of the Dead spell 17 shows Re, in the shape of a tomcat, cutting of the head of Apophis in the eastern horizon.
Because of the enormous threat that Apophis posed, everything possible was done to help Re overthrow him. In the temple of Karnak a text was recited daily, called "The Book of Overthrowing Apophis"; a manuscript of this text is now in the British Museum and similar rituals are known from the temple of Edfu and elsewhere. Illustrations often show how Apophis was cut into pieces, burnt, impaled or rendered harmless in other ways. The ancient Egyptians believed that the magical power of words and illustrations would turn all these into reality.