A second stretch of disunity lasting around a century occurs at the end of the Middle Kingdom, and this is now referred to as the Second Intermediate Period.
Lower Egypt had fragmented into smaller kingdoms and was then brought together under the foreign 15th Dynasty who ruled from Avaris – they are the Hyksos (which just means “rulers of foreign lands” in Egyptian) and they came from Western Asia. Part of the collapse of the Middle Kingdom had involved the loss of Nubia to its own local rulers, and the remnants of the Egyptian state were squeezed between this powerful Kingdom of Kush to the south and the Hyksos to the north.
The 16th & 17th Dynasties ruled from Thebes during this period and the last two kings of the 17th Dynasty began to reconquer Lower Egypt and to push the Kushite kingdom back to Nubia. Under Ahmose I, the first king of the 18th Dynasty, the reconquest was completed and he re-united Egypt inaugurating the New Kingdom.