Abu Ma‘shar the astrologer, in his Book of Thousands, says that the reason for the building of the Pyramids was the dream which Surid ibn Shaluq saw. He confirms it in his Book of Miraculous Dreams, where he adds that he sent for the priests and soothsayers of his time, and the astrologers, and related to them what he had seen of the descent of the Moon upon Earth in the form of a woman; of the overturning of the Earth with its inhabitants, and of the total eclipse of the Sun; and the dream he had after that: and that the Priests declared to him the coming of the Deluge, whereof mention is made in the Book of the Annals… (trans. J. Davies, adapted)
Another passage in Murtada is of interest in tracing the changes in legend. In giving folklore about sexual immorality, he make an interesting mistake that stands out when we compare his words (left) with those of the Akhbar al-zaman (right), written perhaps 100-300 years earlier:
[S]ome entered into the Pyramid with a child to abuse it; and that having committed that sin, there came out against them a black young man, with a cudgel in his hand, who beat them furiously, so that they fled leaving there their food and their clothes. The same thing happened to others in the Pyramid of Akhmim. There entered also into the pyramid of Akhmim a man and a woman to commit adultery therein; but they were immediately cast along on the ground, and died in a frenzy.
(trans. Davies, adapted)
It is said that some men entered the pyramids with a young boy to use him for sex. They saw [the spirit of] a black slave armed with a cane coming at them, and he began to give them terrible blows. They fled immediately, leaving behind their food, their drinks, and some of their clothes. The same thing happened, it is said, to other men in the temple at Akhmim. A man and a woman entered the pyramid to have sex with each other; they were thrown to the ground and seized with a furious delirium that lasted until their death.