8 He remembers his covenant forever, the promise he made, for a thousand generations, 9 the covenant he made with Abraham, the oath he swore to Isaac. 10 He confirmed it to Jacob as a decree, to Israel as an everlasting covenant: 11 "To you I will give the land of Canaan as the portion you will inherit." 12 When they were but few in number, few indeed, and strangers in it, 13 they wandered from nation to nation, from one kingdom to another. 14 He allowed no one to oppress them; for their sake he rebuked kings: 15 "Do not touch my anointed ones; do my prophets no harm." 16 He called down famine on the land and destroyed all their supplies of food; 17 and he sent a man before them- Joseph, sold as a slave. 18 They bruised his feet with shackles, his neck was put in irons, 19 till what he foretold came to pass, till the word of the Lord proved him true. 20 The king sent and released him, the ruler of peoples set him free. 21 He made him master of his household, ruler over all he possessed, 22 to instruct his princes as he pleased and teach his elders wisdom. 23 Then Israel entered Egypt; Jacob resided as a foreigner in the land of Ham.