SOLD at the age of seventeen by his envious brothers, Joseph was taken by the traders into Egypt and sold by them to Potiphar, captain of the royal Egyptian guard (see Gen. 37:36; 39:1). Thus he whose dreams of future greatness had so enraged his brethren now found himself a penniless slave in a foreign land. Yet, although his kindred had rejected him, "the Lord was with Joseph" (Gen. 39:2), and his enforced exile in no way limited his prosperity and his success.
Quickly and accurately recognizing the potentialities of his handsome young slave, Potiphar appointed him overseer over all his household and his personal affairs, and "the Lord blessed the Egyptian's house for Joseph's sake" (verse 5). However, before long Joseph was to meet without flinching a severe test, maintaining his personal purity and his loyalty to his master, although his courageous stand involved his being attacked by false charges leading to his demotion and to imprisonment for a crime that he had not committed.
Even in the prison his steadfastness received its reward, for the jailer placed him over all his fellow prisoners, realizing that "the Lord was with him, and that which he did, the Lord made it to prosper" (verse 23). Moreover, Joseph had a further opportunity of practicing the ability which he had long before shown while at his home in Canaan: that of understanding and interpreting dreams.