The Middle Kingdom
 
This new order is illustrated by the fact that Middle Kingdom nomarchs began to build elaborate tombs for themselves. During this period Egyptians came to believe that all men could earn immortality, by living just lives. As a result of this new belief, Egyptian thinkers began to try to define more exactly what a just life was, and to draw up lists of specific rules to live by. Over time, some writers began to explore the possibility that it might not be necessary to actually life a just life, so long as the soul could convince the judge of the afterlife that it had lived one. So you begin to get books and tomb paintings that show the departed what they will have to go through to arrive at the place of judgment, and what the soul should saw to the gods of judgment in order to achieve immortality.
Strong and stable government during the Middle Kingdom gave Egypt four centuries of peace, prosperity and stability until it was brought down by unanticipated outside attack. In about 1630 Egypt was invaded by a people whom the Egyptians called the Hyksos (“foreigners”). These were Semitic peoples whose ferocity and military technology made it possible for them to conquer the better organized and more numerous Egyptians. In about 1660 B.C. the Hyksos crossed the Sinai Peninsula and occupied Lower Egypt. They brought down the pharaoh and forced the nomarchs of Upper Egypt to pay them tribute. The Egyptians, protected in the past from outside invasion were unprepared for the Hyksos who brought with them the latest in military technology the most important of which were chariots.
It is unclear whether the Egyptians even had made much use of the wheel before about 1700 B.C.; simple sledges were really all they needed to drag goods to and from the Nile. They had oxen and donkeys for beasts of burden, but, before the coming of the Hyksos may not have been introduced to horses. By around 1700 B. C., in Asia Minor warriors were employing the chariot with great effect. Egyptian military technology had, by the 1600s, not really changed much since the Late Stone Age. Most of the weapons in the Egyptian arsenal were stone, and, although they possessed the bow, it was used mostly for hunting. Enter the Hyksos armed with bronze weapons, chariots, and powerful bows. Hyksos archers speeding across the battlefield in chariots quickly devastated the Egyptian infantry. When it came to military affairs, the Egyptians were comparatively quick learners, and in a few generations, the chiefs of Upper Egypt mastered the new technology, built chariots, and rebelled against the Hyksos, expelling them around 1550 B.C.
 
Egypt was reunified around 2000 B.C. when one family of nomarchs defeated the others and established themselves as pharaohs. This established the Middle Kingdom (2000-1800). The new dynasty established a small standing army to defend themselves from their rivals. The pharaohs of the Middle Kingdom were good generals and used their military both to maintain order at home, and expand their empire. They kept the nomarchs under control, and  these administrators began to share power somewhat with their royal masters.