Heka (/ˈhɛkə/; Egyptian: Ḥkȝ; also spelled Hike) was the deification of magic in ancient Egypt. The name is the Egyptian word for "magic". According to Egyptian writing (Coffin text, spell 261), Heka existed "before duality had yet come into being." The term "Heka" was also used to refer to the practice of magical rituals.
The word Heka means action of the Ka or activation of the Ka, the Ka being the ancient Egyptian concept of the vital force. Egyptians believed that activating this power of the soul was how magic worked. "Heka" also implied great power and influence, particularly when drawing upon the Ka of the gods.
In the Coffin Texts, Heka is created at the beginning of time by the creator Atum. He was also said to be the son of Khnum, who created specific individual Ba (another aspect of the soul). As the son of Khnum, his mother was said to be Menhit.
The hieroglyph for his name featured a twist of flax within a pair of raised arms; however, it also vaguely resembles a pair of entwined snakes within someone's arms. Consequently, Heka was said to have battled and conquered two serpents, and was usually depicted as a man choking two giant entwined serpents.
Medicine and doctors were thought to be a form of magic, so Heka's priesthood performed these activities.