a kingdom with which the patriarchs and Israel had many interactions.
In the book of genesis the patriarchs had some encounters with Egypt (during times of famine). In Genesis 37 Yaakov's favorite son, Yosef, is sold into slavery in Egypt by his jealous brothers, setting into motion a chain of events that ends with Yosef rising to power, overseeing food distribution during a seven-year famine, and bringing his family to Egypt to avoid starvation.
Between genesis and exodus a new king rises in Egypt who is not as pleased with Israel as his predecessor was, and at the beginning of Exodus Israel has been enslaved. In the early chapters of Exodus God appoints moses as a spokesman, then reins plagues down upon Egypt until Israel is freed. The Egyptian army is destroyed at the Sea of Reeds ("red sea").