When they reach Canaan, Hashem tells Avram that this is the land that He will give his descendants. There is a famine, and Avram is forced to relocate to Egypt. Sarai is taken to Pharaoh, but Hashem afflicts Pharaoh and his court with harsh plagues, and he releases Sarai unmolested. Avram returns to Canaan with a gift of great wealth from the Egyptians. Lot parts ways with Avram when their shepherds quarrel over grazing rights.
Lot chooses to live in the rich but corrupt city of Sodom.
A war amongst the kings of the region results in the defeat of Sodom and Lot taken captive. Avram overpowers superior forces and rescues Lot, but demurs from accepting any spoils of war. Hashem reveals to Avram that his offspring will be exiled to a strange land and will be oppressed there for 400 years, after which they will emerge with great wealth and return to Israel, their irrevocable inheritance. Sarai is barren and gives Hagar, her Egyptian maidservant, to Avram in order to provide them with a child. She gives birth to Yishmael.