Around 1786 BC some people we call the Hyksos invaded Egypt, ending the Middle Kingdom and starting the Second Intermediate Period. The Hyksos, who were invaders from West Asia, took over the eastern part of the Nile Delta (North-Eastern Egypt, the part closest to Asia), having their capital at Memphis.
Nobody knows for sure who the Hyksos were, but they seem to have been Amorites, who spoke a Semitic language (related to Hebrew and Arabic) and came from the area around Syria and Israel, an area which had traded extensively with the Egyptians during the Middle Kingdom. The Hyksos did very well for about a hundred years, but then (as in the First Intermediate Period) the southern rulers from Thebes again began to reconquer the north of Egypt. In these "wars of liberation," the brothers Kamose and Ahmose fought both the Hyksos and the Nubians, Africans who lived to the south, and succeeded in reuniting Egypt in the New Kingdom.