Jacob lives the final 17 years of his life in Egypt. Before his passing, he asks Joseph to take an oath that he will bury him in the Holy Land. He blesses Joseph's two sons, Manasseh and Ephraim, elevating them to the status of his own sons as progenitors of tribes within the nation of Israel.
The patriarch desires to reveal the end of days to his children, but is prevented from doing so. Jacob blesses his sons, assigning to each his role as a tribe: Judah will produce leaders, legislators and kings; priests will come from Levi, scholars from Issachar, seafarers from Zebulun, schoolteachers from Shimon, soldiers from Gad, judges from Dan, olive growers from Asher, and so on. Reuben is rebuked for "confusing his father's marriage"; Shimon and Levi for the massacre of Shechem and the plot against Joseph. Naphtali is granted the swiftness of a deer, Benjamin the ferociousness of a wolf, and Joseph is blessed with beauty and fertility.
A large funeral procession consisting of Jacob's descendants, Pharaoh's ministers, the leading citizens of Egypt and the Egyptian cavalry accompanies Jacob on his final journey to the Holy Land, where he is buried in the Machpeilah Cave in Hebron.
Joseph, too, dies in Egypt, at the age of 110. He, too, instructs that his bones be taken out of Egypt and buried in the Holy Land, but this would come to pass only with the Israelites' Exodus from Egypt many years later. Before his passing, Joseph conveys to the Children of Israel the testament from which they will draw their hope and faith in the difficult years to come: "G-d will surely remember you, and bring you up out of this land to the land of which He swore to Abraham, Isaac and Jacob."