Atum was one of the sun gods of the ancient Egyptians. The priests used to link various solar deities to the subsequent phases of the sun. Thus Khepri (his name meaning "the one who comes into existence") became the morning sun, Re ("the day") was the sun in midsky and Atum ("the one who completes himself") was the evening sun. Although these gods originally were quite distinct, they are combined already in the Old Kingdom Pyramid Texts into one god Re-Atum.
In the theological tradition of Heliopolis Atum was the primeval and creator god. At the beginning of time he was in the waters of the primeval ocean Nun (who in some texts is called his father). Being tired of swimming he set foot ashore on the first island, the primeval hill. Here he began creation by masturbation or, according to another tradition, by spitting. Thus he created the first pair of gods, Shu and Tefnut. These begot the second pair, Geb and Nut, and the children of these were Osiris, Isis, Nephthys and Seth. Together these gods form the Heliopolitan Ennead.
Just like he had started creation, Atum will, at the end of time, destroy everything. Spell 175 from the Book of the Dead, one of the rare eschatological texts from ancient Egypt, informs us that the world will return to its previous primeval state and will become an inert mass of water once again, in which only Atum and Osiris will live, turned into snakes.