Hyksos - Amalekites - Amu
The Hyksos (Amalekites) seem to have invaded Egypt shortly after the Exodus which occurred at the end of the 13th dynasty. The Hyksos (Amalekites) may even have crossed paths with the departing Israelites shortly after Moses and the Israelites crossed the Red Sea at Rephidim (Exodus 17:8-16 ). 
Egypt was destabilised when Moses (Amenemhet IV) went into exile as there was nobody to continue the 12th dynasty. When Amenemhet III died, his daughter Sobeknefru had to become pharaoh. She only lived for 4 years (possibly 8 years) and when she died, the 12th dynasty ended.
Egypt suffered massive losses 40 years later under Neferhotep as a result of the Exodus (1446BC). This brought about the end of the 13th dynasty. Egypt became vulnerable to invasion as a result of plagues and the loss of it's leader, it's army, it's slaves and it's chariots. (See Evidence for the Israelite Sojourn in Egypt)
The Hyksos (Amalekites) took over and ruled Lower Egypt for the next 400 yrs (the second intermediate period). The Hyksos were 'foreigners' to Egypt and are thought to have originated in Arabia. The word 'Hyc' meant 'Shepherd' and 'sos' meant 'king', thus the word 'Hyksos' meant 'Shepherd King'. They were nomadic herdsmen. They had a reputation of being very cruel and destructive. The Egyptians called them 'Amu'. The Hebrews called them the 'Amalekites'. Some Ancient Arabic manuscripts record an invasion of Egypt by the 'Amalekites'.  They were able to take over Lower Egypt with very little resistance.  
The Hyksos Ruled over Lower Egypt from their fortress at Avaris situated on Egypt's border. They maintained strong garrisons throughout the country and subjugated the regional Nomarchs. Here the Shepherd Kings received tribute from the regional governors and their (Nomes). The princes of the nomes were treated in a distainful manner as described in the Sallier Papyrus I. Apopi II (Agog II / Agag) use to send humiliating demands to Seqenenre in Thebes. Seqenenre was arrested and brought to Avaris. Seqenenre's son Kahmose lead a rebellion in which the Hyksos were eventually defeated with the help of King Saul from Israel. The Hyksos / Amalekites were forced to leave Egypt. Ahmose I, brother of Kahmose, son of Seqenenre became the first pharaoh of the New Kingdom / 18th dynasty. It was Saul who captured Apopi II (Agag) alive and all but annihilated the Hyksos / Amalekites after they left Egypt. Apopi II/ Agag was taken to Samuel who put him to death.
The 16th & 17th dynasties were contemporary with the 15th dynasty (Lower Egypt); but in different parts of the country (Upper Egypt).
The Hyksos were eventually defeated in an uprising lead by the family of Ahmose I from Upper Egypt. Ahmose I lost his father Seqenenre and his brother Kahmose fighting the Hyksos. The Hyksos were forced to leave Egypt and Ahmose I (Nebpehtyre) became the first pharaoh of the 18th dynasty (which was the beginning of New Kingdom of Egypt as it is known). Ahmose I became the pharaoh at a very young age and was coregent with his mother Queen Aahotep in the early part of his reign.
The rule of the Hyksos constitutes most of Egypt's second intermediate period (when foreigners ruled between the end of the Middle Kingdom (12-13th dynasty) and the beginning of the New Kingdom (18th dynasty)).
The Hyksos ruled in Lower Egypt for a period of around 400 years starting soon after the 13th dynasty when the Exodus of the Jews occurred. This period is contemporary with the Israelites 40 years in the wilderness and the time of the Judges in Israel. It fits with the Hyksos being the Amalekites of the Bible in every respect.
The Amalekites / Hyksos were rulers that had Egyptian slaves. 1Samuel 30:13
The Hyksos were the Amalekites of the Bible
This happened in the second month after the Israelites crossed the Red Sea (the Exodus), when they were camping at Rephidim after passing through the Desert of Sin. This was before they arrived at Mount Sinai.
The Hyksos (Amalekites) attacked them but Joshua and his men prevailed as Moses, who was standing on a hill, held his arms up for the men to see. Exodus 17:8-16 The Amalekites fled and eventually ended up going to Egypt. Moses prophesied that they would always be at war with Israel until their final destruction. Exodus 17:14-16 Numbers 24:20
The Hyksos (Amalekites) took over and ruled Lower Egypt for the next 400 yrs (the Second Intermediate Period). The Hyksos (Amalekites) were 'foreigners' to Egypt known as the 'Amu'. The 'Hyksos' were nomadic shepherds originating from Arabia. They were able to take over Lower Egypt with very little resistance. 
The 17th dynasty was contemporay with the 15th & 16th dynasties; but in a different part of the country (Upper Egypt). Seqenenre and Kahmose were the last two pharaohs of the 17th dynasty which was based in Thebes (Upper Egypt).
Seqenenre, the father of Ahmose I lead an uprising starting in Upper Egypt forcing the Hyksos to leave Egypt where they encountered Saul of Israel. Seqenenre and Kahmose both died fighting the Hyksos / Amalekites leaving Ahmose I to start the 18th dynasty once the Hyksos were finally expelled from Egypt.
Saul attacked the Amalekites / Hyksos as instructed by Samuel the last Judge of Israel. He defeated them all the way from Havilah to Shur, near the eastern border of Egypt, not sparing any. Saul captured the Hyksos (Amalekite) king alive (his name was Agag - The last Hyksos king Agog II / Apopi II) and he kept their cattle as plunder. Agag was brought to Samuel who put him to death. Samuel was not happy with Saul for not following his instructions fully. 1Samuel 15:1-34
Later, at a time when David was fleeing from Saul, when he was living in Philistine territory, he raided the Geshurites, the Girzites and the Amalekites. From ancient times these peoples had lived in the land extending to Shur and Egypt. Whenever David attacked an area, he did not leave a man or woman alive, but took sheep and cattle, donkeys and camels, and clothes. 1Samuel 27:1-12
Once David's camp was raided by some Amalekites (Hyksos) and his wives, sons and daughters were taken captive. David and his band of 400 men pursued the Amalekites and recovered all that was stolen and completely destroyed the Amalekites taking their herds as plunder. 1Samuel 30:1-31
The Amalekite who killed Saul took proof to David and was slain for his efforts. 2Samuel 1:1-16
David dedicated the plunder to the LORD; God of the Israelites. 2Samuel 8:8-13
In the time of Hezekiah, the Simeonites annihilated some Amalekites on Mount Seir 1Chronicles 4:43
- The Hykoso identified Terry Hurlbut http://www.examiner.com/article/the-hyksos-identified
- Debbie Hurn - The Amalekites - Were they the Hyksos? Debbie Hurn - The Amalekites - Were they the Hyksos?
- Who were the Hyksos? Save-Soderbergh, t. (1951) The Hyksos rule in Egypt, The Journal of Egyptian Archaeology, Egypt Exploration Society.
- Ages in Chaos Immanuel Velikovski Ages in Chaos.
- Peter A Clayton Chronicle of the Pharaohs The Reign by reign record of the rulers and dynasties of Ancient Egypt. Thames and Hudson 2006 ISBN 978-0-500-28628-9
Chronicle of the Pharaohs The Reign by reign record of the rulers and dynasties of Ancient Egypt. Peter A Clayton. Thames and Hudson 2006 ISBN 978-0-500-28628-9