However, as neighboring civilizations developed militaries capable of crossing Egypt's natural barriers, the Egyptian armies were not always able to repel them and so by 1000 BC Egyptian influence as an independent civilization waned. The Archaic or Early Dynastic Period of Egypt is the era immediately following the unification of Upper and Lower Egypt "c." 3100 BC. It is generally taken to include the First and Second Dynasties, lasting from the end of the Naqada III archaeological period until about 2686 BC, or the beginning of the Old Kingdom. With the First Dynasty, the capital moved from Thinis to Memphis with a unified Egypt ruled by an Egyptian god-king. Abydos remained the major holy land in the south. The hallmarks of ancient Egyptian civilization, such as art, architecture and many aspects of religion, took shape during the Early Dynastic period. During the Early Dynastic period, the pharaohs established the earliest Central Government in the world. The Old Kingdom is the period spanning c. 2686–2181 BC. It is also known as the "Age of the Pyramids" or the "Age of the Pyramid Builders", as it encompasses the reigns of the great pyramid builders of the Fourth Dynasty—King Sneferu perfected the art of pyramid-building and the pyramids of Giza were constructed under the kings Khufu, Khafre and Menkaure. Egypt attained its first sustained peak of civilization—the first of three so-called "Kingdom" periods (followed by the Middle Kingdom and New Kingdom) which mark the high points of civilization in the lower Nile Valley. During the Old Kingdom, the pyramid building in ancient Egypt began during the Third Dynasty under the rule of king Djoser when he built the Step Pyramid of Djoser (Egypt's first Pyramid) and peaked during Fourth Dyansty during the construction of the Giza Pyramids. During the Fifth Dynasty the pyramid building declined in Egypt. The Pyramid Texts, the oldest ritual texts from ancient Egypt first appeared in the late fifth Dynasty. The Middle Kingdom of Egypt (also known as "The Period of Reunification") is the period in the history of ancient Egypt following a period of political division known as the First Intermediate Period. The Middle Kingdom lasted from around 2050 BC to around 1710 BC, stretching from the reunification of Egypt under the reign of Mentuhotep II of the Eleventh Dynasty to the end of the Twelfth Dynasty. The Eleventh Dynasty ruled from Thebes and the Twelfth Dynasty ruled from el-Lisht.