Genesis 37:23-28 New King James Version (NKJV)
23 So it came to pass, when Joseph had come to his brothers, that they stripped Joseph of his tunic, the tunic of many colors that was on him. 24 Then they took him and cast him into a pit. And the pit was empty; there was no water in it.
25 And they sat down to eat a meal. Then they lifted their eyes and looked, and there was a company of Ishmaelites, coming from Gilead with their camels, bearing spices, balm, and myrrh, on their way to carry them down to Egypt. 26 So Judah said to his brothers, “What profit is there if we kill our brother and conceal his blood? 27 Come and let us sell him to the Ishmaelites, and let not our hand be upon him, for he is our brother and our flesh.” And his brothers listened. 28 Then Midianite traders passed by; so the brothers pulled Joseph up and lifted him out of the pit, and sold him to the Ishmaelites for twenty shekels of silver. And they took Joseph to Egypt.