Ancient Egyptian Legends, by M. A. Murray, [1920], at sacred-texts.com
The reason why the city of Pé was given to Horus, I know and I will tell you.
Between Horus and Set there is enmity and hatred, war and battle. Ever the fight goes on and the combatants rage furiously, and victory is not yet declared to either, though the Gods are with Horus.
Now Set is cunning and crafty, and seeks to conquer by subtlety rather than by courage and skill in the fray; and such power is his that he can take what form he will and deceive both men and Gods. This is the power of Set, but the power of Horus is not the same; for to Horus belong righteousness and truth; deceit and falsehood are not in him. Whoso gazes into the blue eyes of Horus can see the future reflected there, and both Gods and men seek Horus to learn what shall come to pass.
It came to the knowledge of Set that Ra would consult with Horus, and it seemed to him that an opportunity was at hand to injure Horus, so
he took upon himself the form of a Black Pig. Fierce was his aspect, long and sharp his tushes, and his colour was the blackness of the thundercloud; savage and evil was his look, and struck fear into the hearts of men.
Then came the Majesty of Ra to Horus and spoke to him saying, "Let me look in thine eyes and behold what is to come." And he gazed into the eyes of Horus, and their colour was that of the Great Green Waters when the summer sky shines upon them. And while he gazed, the Black Pig passed by.
Ra knew not that it was the Evil God, and he cried out to Horus and said, "Look at that Black Pig! Never have I seen one so huge and so fierce."
And Horus looked; neither did he know Set in this strange form, and thought it was a wild boar from the thickets of the North Country. Thus he was off his guard and unprotected against his enemy.
Then Set aimed a blow of fire at the eye of Horus, and Horus shouted aloud with the pain of the fire, and raged furiously, and cried, "It is Set, and he has smitten me with fire on the eyes."
But Set was no longer there, for he had conveyed himself away, and the Black Pig was seen no more. And Ra cursed the pig because of Set, and said, "Let the pig be an abomination to Horus." And to this day men sacrifice the pig when the
[paragraph continues] Moon is at the full, because Set, the enemy of Horus, and the murderer of Osiris, took its form in order to injure the blue-eyed God. And for this reason also swineherds are unclean throughout the land of Egypt; never may they enter the temples and sacrifice to the Gods, and their sons and daughters may not marry with the worshippers of the Gods.
And when the eyes of Horus were healed, Ra gave to him the city of Pé, and he gave to him two divine brethren in the city of Pé, and two divine brethren in the city of Nekhen to be with him as everlasting judges. Then was the heart of Horus glad and he rejoiced, and at the joy of Horus the earth blossomed, and thunderclouds and rain were blotted out.