In addition to measuring the structure, alongside the other pyramids at Giza, al-Baghdadi also writes that the structures were surely tombs, although he thought the Great Pyramid was used for the burial of Agathodaimon or Hermes. Al-Baghdadi ponders whether the pyramid pre-dated the Great flood as described in Genesis, and even briefly entertained the idea that it was a pre-Adamic construction.[74][75] A few centuries later, the Islamic historian Al-Maqrizi (1364–1442) compiled lore about the Great Pyramid in his Al-Khitat. In addition to reasserting that Al-Ma'mun breached the structure in 820 AD, Al-Maqrizi's work also discusses the sarcophagus in the coffin chambers, explicitly noting that the pyramid was a grave.[76]
By the Late Middle Ages, the Great Pyramid had gained a reputation as a haunted structure. Others feared entering, because it was home to animals like bats.[77]

Construction
Preparation of the site
A hillock forms the base on which the pyramid stands. It was cut back into steps and only a strip around the perimeter was leveled,[78] which has been measured to be horizontal and flat to within 21 millimetres (0.8 in).