Muḥammad ibn Isḥāq relates that the ruler of Egypt, al-Walīd ibn ar-Rayyān, accepted Islam at the hands of Joseph—peace be upon him—yet God knows best.
One of the poets has said:
Beyond the narrow straits of fear lies spacious security,
And deepest grief is the doorway to relief.
So never despair: after release from prison
God made Joseph master of the storehouses.
God, Exalted be He, says:
“And the brothers of Joseph came and entered his presence; he recognized them, but they did not recognize him.
When he had supplied them with their provisions he said, ‘Bring me a brother of yours from your father. Do you not see that I give full measure and that I am the best of hosts?
But if you do not bring him to me, you shall have no measure from me, nor shall you come near me.’
They said, ‘We shall persuade his father about him, and we will surely do so.’
Joseph said to his attendants, ‘Put their merchandise back in their saddlebags so that they may recognize it when they return to their family, and perhaps they will come back.’” (12:58–62)
The Most High thus tells of the arrival of Joseph’s brothers—peace be upon him—in Egypt to procure grain. This was after the years of drought had begun and spread throughout all lands and peoples. By then Joseph—peace be upon him—was governor over the affairs of Egypt, both religious and worldly. When they entered his presence he recognized them, while they did not recognize him, for it never crossed their minds that Joseph—peace be upon him—had attained such eminence and majesty. Accordingly, he recognized them and they remained unaware of him.
According to the People of the Book, when they came before him they bowed, and he recognized them but did not wish them to recognize him; so he spoke to them harshly, saying, “You are spies who have come to discover the state of my land.”
They replied, “God forbid! We have come only to purchase supplies for our people because of the hardship and hunger that have struck us. We are the sons of one father from Canaan; we were twelve men, one of us is lost, and our youngest is with our father.”
He said, “I must verify your story.”
They further claim that he detained them for three days, then released them while keeping Simeon with him so that they would bring the other brother; some of this, however, is open to question.
The Almighty says: “And when he had furnished them with their provisions,” meaning that he granted each man the customary allotment of a camel-load and no more. He said, “Bring me a brother of yours from your father.” He had already asked them about their circumstances and how many they were. They answered, “We were twelve men; one of us has gone and his full brother remains with our father.” He said, “When you come back next year, bring him with you. Do you not see that I give full measure and that I am the best of hosts?”—in other words, I have treated you generously and honored your stay. Thus he encouraged them to bring him, and at the same time he warned them: “But if you do not bring him to me, you shall have no measure from me, nor shall you come near me,” meaning, I will give you no supplies and will not admit you at all—the very opposite of the favor he had first shown them.
In this manner he sought to secure the brother’s presence, his longing for him driving him to use both promise and threat. They said, “We shall persuade his father concerning him,” that is, we shall exert ourselves by every possible means to bring him and present him to you, “and we shall surely do so,” meaning that we are indeed able to obtain him.