Genesis 47:27–31

So Israel dwelt in Egypt, that is, in the land of Gessen, and possessed it; and grew, and was multiplied exceedingly. 28And he lived in it seventeen years: and all the days of his life came to a hundred and forty-seven years. 29And when he saw that the day of his death drew nigh, he called his son Joseph, and said to him: If I have found favour in thy sight, put thy hand under my thigh; and thou shalt shew me this kindness and truth, not to bury me in Egypt. 30But I will sleep with my fathers, and thou shalt take me away out of this land, and bury me in the burying place of my ancestors. And Joseph answered him: I will do what thou hast commanded. 31And he said: Swear then to me. And as he was swearing, Israel adored God, turning to the bed's head.