In Egyptian mythology, Thoth was the divine scribe and reckoner of time, the inventor of writing and the patron god of scribes. His cult probably originated in the Delta, but achieved the greatest following in Middle Egypt; later, by association with Khonsu, he acquired the attributes of the moon-god and mastery over science and knowledge. Though usually depicted with a man’s body and the head of an ibis (his sacred bird), Thoth also assumed the form of a great white baboon, invariably endowed with an outsize penis. Baboons habitually shriek just before dawn, and the Egyptians believed that a pair of them uttered the first greetings to the sun from the sand dunes at the edge of the world.
Thoth’s role is rather more complex in relation to the Hermopolitan cosmogony, which ordained that the chaos preceding the world’s creation had four characteristics, each identified with a pair of gods and goddesses: primordial water (Nun/Nanuet), infinite space (Heh/Hehet), darkness (Kek/Keket) and invisibility (Amun/Amunet). From this chaos arose the primeval mound and the cosmic egg from which the sun-god hatched and proceeded to organize the world. While stressing the role of this Hermopolitan Ogdoad (company of eight), Thoth’s devotees credited him with laying the cosmic egg in the guise of the “Great Cackler”, so it’s difficult to know who got star billing in this creation myth. By the New Kingdom it had generally succumbed to the version espoused at Heliopolis, but Thoth’s cult continued into Ptolemaic times.