The Thirteenth dynasty came to an end in the midst of internal troubles. The short reigns of the kings of the dynasty that followed show that the line of the Pharaohs was again becoming feeble. It closed in disaster and overthrow. Hordes of invaders poured into Egypt from Asia and overran the whole country. They are known as the Hyksos or Shepherds, and the greater part of them were of Semitic descent. For 669 years they ruled the valley of the Nile in three dynasties, and the recollection of their hated sway never faded from the Egyptian mind. At first they burned and plundered, then they established themselves in Memphis and Zoan, and from thence governed the rest of the country. But they soon submitted to the influence of Egyptian culture. The conquered people took their conquerors captive, and the Hyksos kings became veritable Pharaohs. The manners and customs, the writing and titles of the native monarchs were adopted, and, in course of time, even the language also. The court was filled with native officials, the cities and temples were restored, and Egyptian learning was patronised. One of the few Egyptian treatises on mathematics that have come down to us is dedicated to a Hyksos sovereign. It was only in religion that the new rulers of Egypt remained foreign.
They continued to worship a form of the Semitic Baal, who was invoked under the Hittite name of Sutekh. An attempt to impose his worship upon the native Egyptians led to the war of independence which ended in the expulsion of the stranger. Apophis III., of the Seventeenth dynasty, sent messengers to Skenen-Ra, the prince of Thebes, bidding him renounce Amon of Thebes for the god of his suzerain. Skenen-Ra resisted, and a long war followed, which, after lasting through five generations, resulted in the complete triumph of the Egyptians. The Hyksos were driven back into Asia, and the prince of Thebes was acknowledged the Pharaoh of an united Egypt (B.C. 1600).
It was while the Hyksos kings were reigning that Abraham visited the Delta. Their court was held at Zoan, now San, close to the Asiatic frontier, and on the frontier itself stood their fortress of Avaris, which served at once to bar the way from Asia and to overawe the conquered Egyptians. The Pharaoh of Joseph was probably Apophis III. If so, the Hebrew vizier would have witnessed the outbreak of the war of independence towards the close of the long reign of the Hyksos king. It may be that the policy which transferred the soil of Egypt from the people to the king and the priests gave its first impulse to the movement.