Heka: The magic of ancient Egypt
…..to me belonged the universe before you gods had come into being. You have come afterwards because I am Heka.
Coffin texts, spell 261 
All religions have a magical aspect , ancient religions like the Egyptian, according to which all of creation was animated to some extent, perhaps more so than many others. Through magic the creation had come into being and was sustained. Thus, magic was more ancient, and consequently more powerful, than the gods themselves
I am one with Atum when he still floated alone in Nun, the waters of chaos, before any of his strength had gone into creating the cosmos. I am Atum at his most inexhaustible – the potence and potential of all that is to be. This is my magic protection and it’s older and greater than all the gods together!
Book of the Dead
It was also the extraordinary means for acquiring knowledge about one’s surroundings – above all the hidden parts of them – and gaining control over them. Gods, demons and the dead could be implored, cajoled or threatened. Their help could be enlisted to avert evil or achieve one’s desires.
Magic was accepted by all ancient peoples as a real force. The Hebrew tradition which was strongly opposed to it, did not deny its efficacy, but rather extolled the even greater magical power of its own god:
8 And the Lord spake unto Moses and unto Aaron saying,
9 When Pharaoh shall speak unto you, saying, Shew a miracle for you: then thou shalt say unto Aaron, Take thy rod, and cast it before Pharaoh, and it shall become a serpent.
10 And Moses and Aaron went in unto Pharaoh, and they did so as the Lord had commanded: And Aaron cast down his rod before Pharaoh, and before his servants, and it became a serpent.
11 The Pharaoh also called the wise men and the sorcerers: now the magicians of Egypt, they also did in like manner with their enchantments.
12 For they cast down every man his rod, and they became serpents; but Aaron’s rod swallowed up their rods.
Egyptian magical thinking continued to influence Europe. Thoth, god of wisdom and learning, was identified with the Greek Hermes Trismegistus. He was thought by the Hermetists to have originated the Hermetica, 42 books of magic .
26th dynasty The worship of Isis, of whom the Metternich Stela (4th century BCE) says I am Isis the goddess, the possessor of magic, who performs magic, effective of speech, excellent of words, became widespread throughout the Roman empire. She was the original mother of god, Isis lactans feeding her son Horus, which Christianity adopted as the Madonna. Her role as protectress is reflected in the Marian cult.
Acquiring magical powers
While its efficiency in the hands of mortal practitioners was perhaps often less than had been hoped for, magic attracted people because it was practical and made sense. Everything had a reason, often hidden to the ordinary person, but revealed to the knowledgeable.
Magical spell written in Coptic
Picture source: Duke Papyrus Archive
Magic explained the relationships between causes and effects using ideas people could relate to. Analogies and symbolisms were widely used, the sympathetic principle of like affecting like was invoked, associations, be they pure coincidence, were imbued with meaning, and historic occurrences became predictors for the future. There were even prescribed ways for explaining why expected results had not materialized. It appears that, originally, the Egyptians, like some other peoples who practiced ritual cannibalism, thought that spiritual powers resided in the body and could be acquired by ingestion. There is no evidence, though, that such a view was more than speculative and ever acted upon.
The king orders sacrifices, he alone controls them,
the king eats humans, feeds on gods,
he has them presented on an altar to himself,
he has agents to do his will. He fires off the orders!
The king eats their magic, he gulps down their souls,
the adults he has for breakfast,
the young are lunch,
the babies he has for supper,
the old ones are too tough to eat, he just burns them on the altar as an offering to himself.
Pyramid Texts 273-4, translated by Jacob Rabinowitz 
Magic was tightly bound up with writing, although there must have been an extensive purely oral tradition which was never recorded and is therefore lost to us. Most practitioners gained magical knowledge by studying ancient scriptures . Chief among them were the lector-priests, the only clerics who were fully professional since the beginning of recorded history. They were the keepers of the sacred books.
The practitioners of magic
Magical knowledge and power emanated from the gods and was bestowed upon their servants, the kings …
Utterance of all the gods, [to] Amon-Re: "This thy daughter [Hatshepsut], who liveth, we are satisfied with her in life and peace. She is now thy daughter of thy form, whom thou hast begotten, prepared. Thou hast given to her thy soul, thy […], thy [bounty], the magic powers of the diadem……
The coronation of Hatshepsut
Breasted Ancient Records of Egypt Part 2, § 220
Come glorious one; I have placed (thee) before me; that thou mayest see thy administration in the palace, and the excellent deeds of thy ka’s that thou mayest assume thy royal dignity, glorious in thy magic, mighty in thy strength.
Thutmose I, summoning his daughter to be crowned
Breasted Ancient Records of Egypt Part 2, § 235
… and their substitutes in the service of the gods, the priesthood. But there were also less exalted magicians who did not deal with life and death, but with more mundane issues like good luck charms, pest control or love potions.
Ay dressed as High Priest performing the Opening of the Mouth ceremony
Tomb KV 62, 18th dynasty
Picture source: Lionel Casson Ancient Egypt Sometimes spells fell into the wrong hands. Anybody capable of reading could use them , and, at times, some did so with evil intentions.
Now, when Penhuibin, formerly overseer of herds, said to him: "Give to me a roll for enduing me with strength and might," he gave to him a magic roll of Usermare-Meriamon (Ramses III), L.P.H., the Great God, his lord, L.P.H., and he began to employ the magic powers of a god upon people.
Records of the Harem Conspiracy against Ramses III
Breasted Ancient Records of Egypt Part 4, § 455
To the ordinary mortal magic could be dangerous, and coming into physical contact with the divine deadly. The accidental touching of the royal sceptre even by a sem priest had to be counteracted by the king’s spell, and the incident was serious enough to be recorded:
The king of Upper and Lower Egypt Neferikare appeared as King of Lower Egypt on the day of the seizing of the anterior rope of the God’s barque. There was the sem priest Rewer before his majesty in his office of sem priest, responsible for the clothing. The ames sceptre which was in the hand of his majesty, touched the foot of the sem priest Rewer. His majesty said to him: "May you be well!" – thus spoke his majesty.
Behold, his majesty said: "It is desirable to my majesty that he may be well, without a blow for him." Behold, he is more esteemed by his majesty than any other man. His majesty ordered to have (it) put in writing on his tomb which is in the necropolis. His majesty caused a record to be made about it, written in the presence of the king himself in the district of the palace, in order to write down according to what had been said in his tomb which is in the necropolis.
From the tomb of Rewer (5th dynasty)
Magic had important pragmatic aspects, which were exploited to achieve the aims of humans, dead or alive, spirits, and gods:
Creation of the world by Ptah, the self-fertilization of Amen or Khnum’s shaping of man from clay were all deeds unachievable by ordinary means.
He (Ptah) gave birth to the gods, He made the towns, He established the nomes, He placed the gods in their shrines, He settled their offerings, He established their shrines, He made their bodies according to their wishes.
From the Shabaka Stone
The giving of birth was not just miraculous, but also dangerous, and the newly born was especially vulnerable.
Picture source: University of Pennsylvania Museum website 
Birth bricks  on which the woman in labour crouched, were decorated with depictions of Hathor and other goddesses and were believed to bestow protection on the mother and above all her baby, and charms were used to guard children from evil demons .
The dead and their resting place needed protecting too and, as history has proven, ancient curses turned out to be most ineffective
The elder of the house of Meni, he says: A Crocodile against him in the water. A snake against him on land. He will do something against that same one. At no time did I do anything against him. It is God who will judge.
Inscription in the tomb of Meni, 6th Dynasty, at Giza
Amulets were worn by the living and given to the dead to empower and ward off evil . Some mummies had dozens of scarabs packed into their bandages.
He (the sun god) created for them magic as a weapon,
to fend off the blows of the happenings.
As diseases were thought to be caused by spirits, healing was a magical science: the giving of medicines and the nursing care were accompanied by spells designed to expel these pathogenic agents.
Get thee back, thou enemy, thou dead man or woman … Thou dost not enter into his phallus, so that it grows limp. Thou dost not cast seed into his anus (?) …
Gardiner, Theban Ostraca, C 1, p.13-15
According to the Bentresh Stela, describing an apparently fictitious medical case in the strange far-off country of Bekhten, when the daughter of the chief fell ill, the statue of Khonsu-the-Plan-Maker, Great God, Smiter of evil Spirits was sent from Egypt:
Then this god went to the place where Bentresh was. Then he wrought the protection of the daughter of the chief of Bekhten. She became well immediately.
Then said the spirit which was in her before Khonsu-the-Plan-Maker-in-Thebes: "Thou comest in peace, thou great god, smiting the barbarians………
I am thy servant. I will go to the place whence I came, to satisfy thy heart concerning that, on account of which thou comest ………."
James Henry Breasted Ancient Records of Egypt Part Three, § 443 f.
Physicians, priests and magicians – no clear demarcation line appears to have separated these, to our eyes very different, callings – seemingly worked according to quite strict guidelines as to how the body was to be examined, how the results were to be interpreted and which treatments were to be performed and which were not.
There are vessels in every limb of the body. When some physician, some sakhmet priest, some magician lays his finger on the head, on the back of the head, on the hands, on the place of the heart, on both arms and both legs, then he will feel the heart, as there are vessels in every limb of the body and it (i.e. the heart) ‘speaks’ at the beginning of the vessels of all body parts.
Ebers Papyrus, col. 99
The more radical cures, like Isis restoring Osiris to life or Khufu’s magician Djedi re-attaching cut-off heads belonged strictly to the realms of mythology or fancy.
The acquisition of knowledge concerning spiritual beings or the future enhanced a person’s control over his destiny. One path to such knowledge was the interpretation of dreams, which was also used for justifying one’s actions or legitimizing one’s power:
In year 1, of his coronation as king …… his majesty saw a dream by night: two serpents, one upon his right, the other upon his left. Then his majesty awoke, and he found them not. His majesty said: "Wherefore [has] this [come] to me?" Then they answered him, saying: "Thine is the Southland; take for thyself (also) the Northland. The two goddesses shine upon thy brow, the land is given to thee, in its length and its breadth. [No] other divides it with thee."
Stela of Tanutamen
James Henry Breasted Ancient Records of Egypt Part Four § 922
The power attained through magic could serve many purposes, good or evil. It could be used to manipulate people’s behaviour or feelings as the many love-spells prove . According to the writings of Pseudo-Callisthenes Nectanebo II used magic to defend his country from outside enemies.
Magical stela, middle of 4th century BCE =>
Picture source: Metropolitan Museum 
Whenever he was threatened with invasion by sea or by land he succeeded in destroying the power of his enemies, and in driving them from his coasts or frontiers; and this he did by the following means. If the enemy came against him by sea, instead of sending out his sailors to fight them, he retired into a certain chamber, and having brought forth a bowl which he kept for the purpose, he filled it with water, and then, having made wax figures of the ships and men of the enemy, and also of his own men and ships, he set them upon the water in the bowl, his men on one side, and those of the enemy on the other.
He then came out, and having put on the cloak of an Egyptian prophet and taken an ebony rod in his hand, he returned into the chamber, and uttering words of power he invoked the gods who help men to work magic, and the winds, and the subterranean demons, which straightway came to his aid. By their means the figures of the men in wax sprang into life and began to fight, and the ships of wax began to move about likewise; but the figures which represented his own men vanquished those which represented the enemy, and as the figures of the ships and men of the hostile fleet sank through the water to the bottom of the bowl, even so did the real ships and men sink through the waters to the bottom of the sea.
In this way he succeeded in maintaining his power, and he continued to occupy his kingdom in peace for a considerable period.
E. A. Wallis Budge Egyptian Magic 
Through death a person lost his power over his body. In order for him to pass safely through the underworld his mummy’s sensual functions had to be restored. This was done in the ceremony of the opening of the mouth. Statues were similarly empowered.
There was no tradition of magic that was evil in itself, what we would refer to as Black Magic, but magic could be abused and was in these instances treated as criminal behaviour, though possibly especially abhorrent. Both in the Rollin and the Lee Papyrus the deeds of magicians who had supported a conspiracy against Ramses III were called "great crimes of death", "the abominations of the land" or the like.
The practice of magic
The [magician Horus-son-of] Paneshe returned [quickly]; he brought his books and his amulets to [where Pharaoh] was. He recited a spell to him and bound an amulet on him, to prevent the sorceries of the Nubians from gaining power over him. He [went] out from Pharaoh’s presence, took his offerings and libations, went on board a boat, and hastened to Khmun. He went to the temple of Khmun, [made his] offerings and his libations before Thoth, the eight-times great, the lord of Khmun, the great god. He made a prayer before him saying: "Turn your face to me, my lord Thoth! Let not the Nubians take the shame of Egypt to the land of Nubia! It is you who [created] magic [spells]. It is you who suspended the sky, who founded the earth and the netherworld, who placed the gods with ……. Let me know how to save Pharaoh [from the sorceries of the] Nubians!"
In order for magic spells to succeed elaborate preparations had to be made at times: It was generally wise not to choose an unlucky day, the time (dusk and dawn were especially auspicious) and place (often a dark chamber, a dark recess, a clean dark cell or a secret dark place) had to be appropriate, and, as is only proper for such spiritual endeavours, the ingredients, the medium and the magician had to be suitable, which generally meant that they had to be ritually pure: If it be that you do not apply (?) purity to it, it does not succeed; its chief matter is purity .
Thus in one divination spell a boy who has not been with a woman as medium was required, in another one could address the moon after being pure for three days.
Implements and ingredients too needed to be acceptable, either new or carefully cleansed:
You go to a dark chamber with its [face] open to the South or East in a clean place: you sprinkle it with clean sand brought from the great river; you take a clean bronze cup or a new vessel of pottery and put a lok-measure of water that has settled (?) or of pure water into the [cup] and a lok-measure of real oil pure ….
One’s own semen, a new brick or even milk of a black cow were relatively easy to come by, a two-tailed lizard on the other hand needed some searching, and Alexandrian weasels or hawks were becoming quite rare in the late first millennium BCE: in a temple which specialised in mummifying hawks there was a major scandal when it was discovered that the mummies contained anything but hawks.
The word, spoken or, perhaps even more potent, written down and read out aloud, was the means to influence other beings and bend them to one’s will. Speech was often accompanied by actions, precisely prescribed rituals for which there were no obvious reasons and which frequently were repeated:
…… you take a vine-shoot before it has ripened grapes, you take it with your left hand, you put it into your right hand – when it has grown seven digits (in length) you carry it [into your] house, and you take the [fish] out of the oil, you tie it by its tail with a strip (?) of flax,you hang it up to . ..of(?) the vine-wood……
Execration rituals included piercing of a figurine with needles or knives, spitting, or burning. Some pharaohs asserted their dominance over their enemies by symbolically trampling on them: they had their foes’ pictures painted on the soles of their sandals.
Talisman facilitating the process of childbirth
Source: © Georges Poncet / Musée du Louvre  Many spells required the use of special foodstuffs , magical implements, figurines, talismans and the like. During the Middle Kingdom magic knives , sometimes also called apotropaic  wands, were made of carved hippo tusks and often decorated with animal depictions. One of them carried the words Cut off the head of the enemy when he enters the chamber of the children and the spells were hoped to afford protection from snakes, scorpions and other dangers. Animal figurines were among the equipment of tombs. Very popular were hippo talismans. Hippos are fiercely protective of their young and dangerous to man, the dead were therefore frequently endowed with figurines which had a leg purposely broken off to prevent them from hurting the tomb owners.
Vessels, lamps, knives and other utensils were used. Blood (of smun-geese, hoopoes, nightjars, worms, puppies, humans etc), semen, oil and water were mixed with other animal or plant matter (shavings from the head of a dead man, hawk, ibis or crocodile eggs, gall of a gazelle, ankh-amu plant, [senepe plant], ‘Great-of-Amen’ plant, qes-ankh stone, genuine lapis-lazuli, ‘footprint-of-Isis’ plant). Myrrh and frankincense were burned as was the Anubis-plant. Turpentine and styrax (storax), a fragrant gum, were added to the incense .
In execration rituals figurines were made of wax which could then easily be destroyed by force or by fire
Ancient Egypt Magazine, Issue Nine – November/December 2001 
This spell is to be recited over (an image of) Apophis drawn on a new sheet of papyrus in green ink, and (over a figure of) Apophis in red wax. See, his name is inscribed on it in green ink … I have overthrown all the enemies of Pharaoh from all their seats in every place where they are. See, their names written on their breasts, having been made of wax, and also bound with bonds of black rope. Spit upon them! To be trampled with the left foot, to be fallen with the spear (and) knife; to be placed on the fire in the melting-furnace of the copper-smiths … It is a burning in a fire of bryony. Its ashes are placed in a pot of urine, which is pressed firmly into a unique fire.
Nine Measures of Magic; Part 3: ‘Overthrowing Apophis’: Egyptian ritual in practice
Ancient Egypt Magazine Issue Nine – November/December 2001 
Things were often chosen for their colour. Black, mentioned twenty times in the Demotic Magical Papyrus, and white, twelve instances, dominated: milk from a black cow, blood of a black dog, a new white lamp etc.
Great importance was attached to the names of the invoked gods or spirits, names which were hidden from the uninitiated. The very knowledge of their true names as opposed to those more widely known (Sarpot Mui-Sro is my name, Light-scarab-noble (?) is my true name) , gave one considerable power over them. These appellations had to be pronounced properly, in the right sequence and in their entirety:
‘…….. Io, Tabao, Soukhamamon, Akhakhanbou, Sanauani, Ethie, Komto, Kethos, Basaethori, Thmila, Akhkhou, give me answer as to everything about which I ask here to-day.’ Seven times.
This invocation was to be repeated seven times. Often a simple two-fold repetition seemed to suffice, but three-, four- and even nine-fold reiterations were also frequent. In Ani’s Book of the Dead, the deceased reaffirms his innocence four times:
I am pure. I am pure. I am pure. I am pure.
Budge The Book of the Dead, Chapter 125 
These magical numbers were also important in other contexts. A certain love spell required nine apple-pips together with your urine, another a Kesh…-fish of nine digits and black. For a vessel divination three new bricks were needed; and one was supposed to pour an unsavory concoction of semen, blood and other ingredients into a cup of wine and add three uteh to it of the first-fruits of the vintage. Other numbers like five, six or eight were rarely used .
When the life of a patient was in danger because of a snake bite, a sekhmet priest might threaten to cause the solar barque to run aground on a sandbank, describing the dire consequences to the very fabric of the world that would ensue:
The sun barque is at rest and does not proceed,
The sun is still in the same spot as yesterday.
The nourishment is without ship, the temple is barred,
There the disease will turn back the disturbance
To yesterday’s location.
The daemon of darkness is about, the times are not separated.
The shadow’s shapes cannot be observed anymore.
The springs are blocked, the plants wither,
Life is taken from the living
Until Horus recovers for his mother Isis,
And until the patient’s health is restored as well.
After Jan Assmann Ägypten – Theologie und Frömmigkeit einer frühen Hochkultur, p.85
The need of the deceased for magic was perhaps even greater than that of the living. After dying they were completely helpless until their faculties had been restored by the ritual of the Opening of the Mouth and they had been equipped with the knowledge needed to address gods and daemons by their hidden, true names and the spells necessary to ward off the dangers they would encounter.
Homage to thee, O great God, Lord of Maati! I have come unto thee, O my Lord, and I have brought myself hither that I may behold thy beauties. I know thee, I know thy name, I know the names of the Forty-two Gods who live with thee in this Hall of Maati, who live by keeping ward over sinners, and who feed upon their blood on the day when the consciences of men are reckoned up in the presence of the god Un-Nefer. In truth thy name is "Rehti-Merti-Nebti-Maati."
The Papyrus of Ani, translated by E.A.W. Budge
But not all was gloom in the Netherworld. The duties a person had to perform by himself in this world, could be attended to by a stand-in, an ushabti (also called shawabti at times) in the next, if you knew how to make him do it :
Spell for causing a shawabti to work for its owner in the underworld. To be recited over the shawabti, which will be made either of tamarisk or thorn wood. This shall be carved to resemble its owner as he appeared in life, and placed in the tomb.
Look upon this man, ye gods, transfigured souls and spirits of the dead,
for he has acquired force, seized his moment, taken on royal authority,
he’s a pharaoh, ruling mankind, controlling them like cattle.
They were created to serve him. The gods themselves ordained it.
If, in the world of the dead, X is ordered to perform the yearly stint of public work all Egyptians owe their pharaoh,
be it to move bricks, level off a plot of ground, re-survey land when the Nile-flood recedes or till new-planted fields,
you will say; "Here I am!" to any functionary who comes looking for X while he is trying to enjoy his meal of funerary offerings.
Take up your hoe, shawabti, your pick, your demarcation pegs, your basket, just as any slave would for his master.
O shawabti made for X, if X is called for his obligations to the state you will pipe up: "Here I am!" whether X is summoned to oversee workers in the new-planted fields, tend to irrigation, move sand from East to West or vice versa
"Here I am!" you will say and take his place.
Coffin Text 472, translated by Jacob Rabinowitz 
Addressing supernatural powers
Prayers and offerings
In dealing with the gods care was required. They were powerful and, consequently, highly respected: Mut carried the epithet Great in Magic, the vulture-headed Heknet was Mistress of Spirits, the hippo goddess Taweret was called Great of Sorcery and Sekhmet was the Powerful One. Their nature was often dual: Taweret was a protectress against Typhonic powers, carrying an ankh or a burning torch, but she had the form of an extremely dangerous animal ; Sekhmet, a ferocious lion goddess, brought death and destruction when she accompanied the pharaoh on his campaigns of war, but was the main support of the healers in their fight against disease. It was best to treat them with reverence.
Many people today may see practices such as prayers and offerings to gods as distinct from magic, it was not to the Egyptians. Both the living and the dead went to great lengths to receive the blessing of the gods. Hymns of praise were composed and recited, written down on papyrus and put in the tombs. Offerings of food, real or carved on walls, were supposed to satiate the god’s hunger and thirst.
Just as the statue of the god Amen for instance was the god himself, a magician, by identifying himself with a god, was transformed into him
‘I will say: "Come to me Montu, lord of the day! Come, that you may put N born of N into my hand like an insect in the mouth of a bird". I am Montu whom the gods adore. I will sever your bones and eat your flesh.’
Ostracon found at Deir el Medine
Ancient Egypt Magazine: Nine measures of magic 
Invoking and dismissing
Lesser magical beings like demons, spirits or the deceased did not quite warrant the same amount of respect. But they were the main agents of magic and could be invoked by simple means:
Prescription to make them speak: you put a frog’s head on the brazier, then they speak.
Prescription for bringing the gods in by force: you put the bile of a crocodile with pounded frankincense on the brazier. If you wish to make them come in quickly again, you put stalks (?) of anise (?) on the brazier together with the egg-shell as above, then the charm works at once.
If they did not obey they (even lamps) could be threatened:
I will not give thee oil, I will not give thee fat. O lamp; verily I will give thee the body of the female cow and put blood of the male bull into (?) thee and put thy band to the testicles (?) of the enemy of Horus.
Once one had received their services it was best to send them away as they could be unpredictable
His dismissal formula: ‘Farewell (bis) Anubis, the good ox-herd, Anubis (bis), the son of a (?) jackal (and ?) a dog . . . another volume saith: the child of . . . Isis (?) (and ) a dog, Nabrishoth, the Cherub (?) of Amenti, king of those of…..’ Say seven times.
The charm which you pronounce when you dismiss them to their place: ‘Good dispatch, joyful dispatch!’