Second Intermediate PeriodAfter the end of the 12th Dynasty, Egypt once again went into decline and began to disintegrate, with petty kings ruling separate parts of the land. Instability and weakness allowed foreigners from the (Near-)East, known as the Hyksos, to enter and gain influence in the north, eventually founding the 15th Dynasty, which hailed from Avaris in the east of the Delta. The rest of the land remained under the local rule of lesser Dynasties. The last and perhaps most important Hyksos ruler was Apophis, who incidentally bore an Egyptian name. He was ousted by the kings of the 17th Dynasty, who had come to power in Thebes and were able to reunite the whole of Upper Egypt as far as the Assiut region. The Hyksos appealed to their allies in Kush [glossary!] for help, which never materialised, and eventually the brothers Kamose and Ahmose were able to expel the Hyksos from Egypt. As the reunifier of the Two Lands, Ahmose became the founder of the 18th Dynasty.