When Midianite traders passed by, his brothers pulled Joseph out of the pit and sold him for 20 pieces of silver to the Ishmaelites, who took Joseph to Egypt.