The 13th Dynasty was characterised by struggles for the throne. Numerous kings who were not related but of varying origin ruled for short periods. The residence remained Itjitawy near el-Lisht, founded in the 12th Dynasty, and the substantial bureaucratic system of the Middle Kingdom continued to function. Nevertheless, the kings soon were no longer in control of the entire country; part of Lower Egypt was ruled from the Delta by kings of the 14th Dynasty, which eventually resulted in the unity of the country being lost again. Conquerors entering the Delta from western Asia were able to gain influence, and eventually one of them succeeded in capturing the residence of the 13th Dynasty. He proclaimed himself king, and he and a number of his successors were called the Hyksos (15th Dynasty). The residence was moved to Avaris in the Delta, and the land was quickly divided into a number of small kingdoms. The rulers of the kingdoms of Middle and Lower Egypt, often called the minor Hyksos kings, were known as the 16th Dynasty. The last and perhaps most important Hyksos ruler was Apophis, who incidentally bore an Egyptian name. In the meantime, the kings of the 17th Dynasty had come to power in Thebes, once again rulers from different families. The whole of Upper Egypt, as far as the Asiut region, was soon reunited. Further concentration of power took place under Tao II/Seqenenre who, however, came to a violent end. His son Kamose prepared the way for the definitive liberation of Egypt by steadily moving northwards. The Hyksos appealed to their allies in Kush for help which never materialised (Kamose erected stelae telling of this in the temple of Karnak). A brother of Kamose, Ahmose, was the one who eventually expelled the Hyksos from Egypt. As the reunifier of the Two Lands he became the founder of the 18th Dynasty.