When they saw him from a distance and before he came close to them, they plotted against him to put him to death. They said to one another, “Here comes this dreamer! Now then, come and let us kill him and throw him into one of the pits; and we will say, ‘A wild beast devoured him.’ Then let us see what will become of his dreams!” But Reuben heard this and rescued him out of their hands and said, “Let us not take his life.” Reuben further said to them, “Shed no blood. Throw him into this pit that is in the wilderness, but do not lay hands on him”—that he might rescue him out of their hands, to restore him to his father. So it came about, when Joseph reached his brothers, that they stripped Joseph of his tunic, the varicolored tunic that was on him; and they took him and threw him into the pit. Now the pit was empty, without any water in it.
Then they sat down to eat a meal. And as they raised their eyes and looked, behold, a caravan of Ishmaelites was coming from Gilead, with their camels bearing aromatic gum and balm and myrrh, on their way to bring them down to Egypt. Judah said to his brothers, “What profit is it for us to kill our brother and cover up his blood? Come and let us sell him to the Ishmaelites and not lay our hands on him, for he is our brother, our own flesh.” And his brothers listened to him. Then some Midianite traders passed by, so they pulled him up and lifted Joseph out of the pit, and sold him to the Ishmaelites for twenty shekels of silver. Thus they brought Joseph into Egypt.
Now Reuben returned to the pit, and behold, Joseph was not in the pit; so he tore his garments. He returned to his brothers and said, “The boy is not there; as for me, where am I to go?” So they took Joseph’s tunic, and slaughtered a male goat and dipped the tunic in the blood; and they sent the varicolored tunic and brought it to their father and said, “We found this; please examine it to see whether it is your son’s tunic or not.” Then he examined it and said, “It is my son’s tunic. A wild beast has devoured him; Joseph has surely been torn to pieces!” So Jacob tore his clothes, and put sackcloth on his loins and mourned for his son many days. Then all his sons and all his daughters arose to comfort him, but he refused to be comforted. And he said, “Surely I will go down to Sheol in mourning for my son.” So his father wept for him. Meanwhile, the Midianites sold him in Egypt to Potiphar, Pharaoh’s officer, the captain of the bodyguard.