KhepriKhepri is associated with the dung beetle (kheper), whose behavior of maintaining spherical balls of dung represents the forces which move the sun. Khepri gradually came to be considered as an embodiment of the sun itself, and therefore was a solar deity. To explain where the sun goes at night, such pushing was extended to the underworld, Khepri's pushing of the sun being ceaseless.
Since the scarab beetle lays its eggs in the bodies of various dead animals, including other scarabs, and in dung, from which they emerge having been born, the ancient Egyptians believed that scarab beetles were created from dead matter. Because of this, they also associated the Khepri with rebirth, renewal, and resurrection. Indeed, his name means "to come into being". As a result of this, when the rival cult of the sun-god Ra gained significance, Khepri was identified as the aspect of Ra which constitutes only the dawning sun (i.e. the sun when it comes into being).
Khepri was principally depicted as a whole scarab beetle, though in some tomb paintings and funerary papyri he is represented as a human male with a scarab as a head. He is also depicted as a scarab in a solar barque held aloft by Nun. When represented as a scarab beetle, he was typically depicted pushing the sun across the sky every day, as well as rolling it safely through the Egyptian underworld every night. As an aspect of Ra, he is particularly prevalent in the funerary literature of the New Kingdom, when many Ramesside tombs in the Valley of the Kings were decorated with depictions of Ra as a sun-disc, containing images of Khepri, the dawning sun, and Atum, the setting sun.