Saharan region of Niger. It is also possible that these megalithic monuments in the Saharan region of Niger and the Eastern Sahara may have served as antecedents for the mastabas and pyramids of ancient Egypt. During Predynastic Egypt, tumuli were present at various locations (e.g., Naqada, Helwan). From the time of the Early Dynastic Period (c. 3150–2686 BCE), Egyptians with sufficient means were buried in bench-like structures known as mastabas. At Saqqara, Mastaba 3808, dating from the latter part of the 1st Dynasty, was discovered to contain a large, independently built step-pyramid-like structure enclosed within the outer palace facade mastaba. Archaeological remains and inscriptions suggest there may have been other similar structures dating to this period. The first historically documented Egyptian pyramid is attributed by Egyptologists to the 3rd Dynasty pharaoh Djoser. Although Egyptologists often credit his vizier Imhotep as its architect, the dynastic Egyptians themselves, contemporaneously or in numerous later dynastic writings about the character, did not credit him with either designing Djoser's pyramid or the invention of stone architecture. The Pyramid of Djoser was first built as a square mastaba-like structure, which as a rule were known to otherwise be rectangular, and was expanded several times by way of a series of accretion layers, to produce the stepped pyramid structure we see today. Egyptologists believe this design served as a gigantic stairway by which the soul of the deceased pharaoh could ascend to the heavens. Though other pyramids were attempted in the 3rd Dynasty after Djoser, it was the 4th Dynasty, transitioning from the step pyramid to true pyramid shape, which gave rise to the great pyramids of Meidum, Dahshur, and Giza. The last pharaoh of the 4th Dynasty, Shepseskaf, did not build a pyramid and beginning in the 5th Dynasty; for various reasons, the massive scale and precision of construction decreased significantly leaving these later pyramids smaller, less well-built, and often hastily constructed. By the end of the 6th Dynasty, pyramid building had largely ended and it was not until the Middle Kingdom that large pyramids were built again, though instead of stone, mudbrick was the main construction material. Long after the end of Egypt's own pyramid-building period, a burst of pyramid-building occurred in what is present-day Sudan, after much of Egypt came under the rule of the Kingdom of Kush, which was then based at Napata. Napatan rule, known as the 25th Dynasty, lasted from 750