When the Ishmaelites, whose other name is Midianites, came to the brother's camp, Joseph's brothers pulled him up out of the hole in the ground. The brothers sold him to the Ishmaelites for 20 pieces of silver. And so, Joseph went to Egypt as a prisoner.