A second wave of Asiatics called Hyksos (from Heqa-khasut, "rulers of foreign lands" as Egyptians called their leaders) immigrated into Egypt and overran the Canaanite center of power at Avaris, starting the 15th Dynasty there.
The Hyksos kings gained the upper hand over Lower Egypt early into the Second Intermediate Period (1657-1549 BC).
When the Hyksos took Memphis during or shortly after Merneferre Ay's reign (c. 1700 BC), the rulers of the 13th Dynasty fled south to Thebes, which was restored as capital.

Theban princes (now known as the 16th Dynasty) stood firmly over their immediate region as the Hyksos advanced from the Delta southwards to Middle Egypt.
The Thebans resisted the Hyksos' further advance by making an agreement for a peaceful concurrent rule between them.
The Hyksos were able to sail upstream past Thebes to trade with the Nubians and the Thebans brought their herds to the Delta without adversaries.
The status quo continued until Hyksos ruler Apophis (15th Dynasty) insulted Seqenenre Tao (17th Dynasty) of Thebes.
Soon the armies of Thebes marched on the Hyksos-ruled lands.
Tao died in battle and his son Kamose took charge of the campaign.
After Kamose's death, his brother Ahmose I continued until he captured Avaris, the Hyksos capital.
Ahmose I drove the Hyksos out of Egypt and the Levant and reclaimed the lands formerly ruled by them.
A second wave of Asiatics called Hyksos (from Heqa-khasut, "rulers of foreign lands" as Egyptians called their leaders) immigrated into Egypt and overran the Canaanite center of power at Avaris, starting the 15th Dynasty there. The Hyksos kings gained the upper hand over Lower Egypt early into the Second Intermediate Period (1657-1549 BC). When the Hyksos took Memphis during or shortly after Merneferre Ay's reign (c. 1700 BC), the rulers of the 13th Dynasty fled south to Thebes, which was restored as capital.
Theban princes (now known as the 16th Dynasty) stood firmly over their immediate region as the Hyksos advanced from the Delta southwards to Middle Egypt. The Thebans resisted the Hyksos' further advance by making an agreement for a peaceful concurrent rule between them. The Hyksos were able to sail upstream past Thebes to trade with the Nubians and the Thebans brought their herds to the Delta without adversaries. The status quo continued until Hyksos ruler Apophis (15th Dynasty) insulted Seqenenre Tao (17th Dynasty) of Thebes. Soon the armies of Thebes marched on the Hyksos-ruled lands. Tao died in battle and his son Kamose took charge of the campaign. After Kamose's death, his brother Ahmose I continued until he captured Avaris, the Hyksos capital. Ahmose I drove the Hyksos out of Egypt and the Levant and reclaimed the lands formerly ruled by them.
Thebes, Egypt