Meanwhile, down in Egypt, the Midianites sold Joseph to Potiphar, one of Pharaoh's court officials, who was also Commander-in-Chief of the imperial guards.