Although the Second Intermediate period is generally considered to start at the beginning of the Thirteenth Dynasty, it is now thought that central authority was maintained until the later part of the dynasty. However, by the end of the dynasty, the obscure Fourteenth Dynasty had established an alternative power centre in the eastern delta.
It is believed to have started when 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.
At an indeterminate point, the Middle Kingdom crumbled and control in the Delta broke apart into many smaller units centred on towns while another dynasty sprung up once more in Thebes. Perhaps as a result of the fragmentation of political power, the Thirteenth Dynasty lost control over Nubia and there is evidence to show that even Buhen was deserted at this point.
It was when the government center moved to Thebes following Merneferra Ay (c. 1695-1685). The 2nd Intermediate Period ended when an Egyptian monarch from Thebes, Ahmose, having driven the Hyksos from Avaris into Palestine, reunified Egypt, and established the 18th Dynasty, the start of the period known as the New Kingdom of Ancient Egypt.
This period saw the decline of the past thirteenth and fourteenth dynasties and the great increase in number of the Asian population whom, bit by bit started to settle and spread in the whole land of Egypt. Through a number of fifty years, the Asians started to join force and with their new skills, like ironwork and mastery of horses, invade Egypt.
The last rules of the Seventeenth Dynasty at Thebes began a campaign against the northern Hyksos rulers. King Seqenenre Tao’s bodily remains have been found with a fatal wounding to the head, which may have been suffered during a battle against them. The following rulers were Kamose and Ahmose, who continued the battle against the Kingdom of Avaris. Ahmose I finally ended the Hyksos rule and as the instrument of the reunification of Egypt, he is credited wsith the founding of the Eighteenth Dynasty and thus the New Kingdom.