Ibn Mas‘ud (may Allah be pleased with him) said: “The three people of greatest discernment were the Aziz with regard to Joseph, when he said to his wife, ‘Make his stay comfortable; perhaps he will benefit us’; the daughter of Shu‘ayb (peace be upon him), when she said to her father concerning Moses (peace be upon him), ‘My dear father, hire him’; and Abu Bakr with regard to Umar (may Allah be pleased with them), when he appointed him as his successor.” (1)
“And thus We established Joseph in the land”—[that is, in the land of Egypt] (2)—meaning: just as We saved Joseph from being killed and brought him out of the well, so too [We established him] (3) in the land, making him overseer of its storehouses.
“And that We might teach him the interpretation of dreams,” meaning: [We established him] (4) in the land so that We might teach him the interpretation of dreams; that is, the interpretation of visions.
“And Allah prevails over His affair.” It was said that the pronoun in “His affair” refers to Allah, exalted is He. That is, Allah prevails over His affair: He does whatever He wills; nothing can overcome Him, and no one can overturn His decree.
It was also said that it refers to Joseph (peace be upon him). Its meaning is that Allah oversees Joseph’s affair through His planning [and protection] (5), and does not entrust him to anyone until He brings him to the culmination of what He has decreed for him.
“But most people do not know” what Allah is doing.
“And when he reached full maturity, We granted him judgment and knowledge. Thus do We reward those who do good.” (22)
“And when he reached full maturity,” that is, the height of his youth, vigor, and strength. Mujahid said: thirty-three years of age.
Al-Suddi said: thirty years of age.
Al-Dahhak said: twenty years of age.
Al-Kalbi said: full maturity is from eighteen to thirty years of age.
Malik (may Allah have mercy upon him) was asked about full maturity, and he replied: “It is puberty.” (6)
“We granted him judgment and knowledge”: judgment means prophethood, and knowledge means understanding of the religion.