Allah Gave the Prophet Yusuf (AS) Power Over the Treasure of Egypt
Right from early childhood the Prophet Yusuf (as) was tested with all sorts of troubles, but displayed the most exemplary patience in the face of these, thus earning the approval of Allah, the infinitely compassionate and loving. This holy individual was exposed to many difficulties during the course of his life but never despaired and always trusted in and gave thanks to Allah.
At a very early age the Prophet Yusuf (as) fell into a trap set for him by his brothers. Their first intention was to kill him outright, but at the suggestion of one of the brothers they cast him into a well instead. At that most difficult moment a miracle took place and Allah gave him knowledge of the future, revealing that He would foil all the snares set for him;
"But when, in fact, they did go out with him and gathered all together and agreed to put him at the bottom of the well, We then revealed to him that: 'You will inform them of this deed they perpetrate at a time when they are totally unaware'." (Surat Yusuf, 15)
These tidings imparted to the Prophet Yusuf (as) by Allah soon came true. A group passing by the well found the prophet, although as they rescued him their real intention was to enslave and sell him instead;
Some travellers came that way and then dispatched their water-drawer who let his bucket down. He said, 'Good news for me, I've found a boy!' They then hid him away among their goods. Allah knew very well what they were doing. (Surat Yusuf, 19)
Slavery was widespread in Egypt at that time. Child slaves in particular were highly valued. His rescuers achieved their aim and sold him to the Egyptians for a very low price.
When the Prophet Yusuf (as) reached adulthood his physical beauty began attracting the attention of a great many women. First among these was the lady of the house he served, the wife of the Egyptian governor. Before long the governor's wife made an improper suggestion to him, though the Prophet Yusuf (as) rejected this outright. Instead, he sought refuge in Allah as he knew that such a course of action would be sinful. This is how the Prophet Yusuf's (as) behaviour in the face of that suggestion is described in the Qur'an:
The woman whose house it was solicited him. She barred the doors and said, 'Come over here!' He said, 'Allah is my refuge! He is My lord and has been good to me with where I live. Those who do wrong will surely not succeed.' She wanted him and he would have wanted her, had he not seen the Clear Proof of his Lord. That happened so We might avert from him all evil and lust. He was Our chosen slave. (Surat Yusuf, 23-24)
However, even though he was totally free of guilt, the governor's wife began slandering him. She told her husband that the Prophet Yusuf (as) had been making advances to her. And she demanded that he be punished.
They raced to the door. She tore his shirt at the back. They met her husband by the door. She said, 'How should a man whose intention was to harm your family be punished for what he did except with prison or painful punishment'? (Surat Yusuf, 25)
The Qur'an goes on to say:
He said, 'It was she who tried to seduce me.' A witness from her people then declared, 'If his shirt is torn in front, she speaks the truth and he has clearly told a shameless lie. If his shirt is torn at the back, then she has lied and he has clearly told the simple truth'. (Surat Yusuf, 26-27)
This reply was an indication of the Prophet Yusuf's (as) innocence. The woman had torn the back of the prophet's shirt, and the significance of this became apparent. As the Prophet Yusuf (as) approached the door the woman had come up behind him. The governor realised that the Prophet Yusuf (as) was innocent and that his wife had made the whole story up. Yet matters did not end there. People began gossiping about what had taken place between the prophet and the governor's wife. This made her exceedingly uncomfortable. So she began preparing another plan. Her plan was to prove that her improper suggestion to the Prophet Yusuf (as) was justified, because his extraordinary beauty attracted the admiration of large numbers of women.
Despite all the Prophet Yusuf's (as) determination, Aziz's wife renewed her proposition in full public gaze. She said that if he refused her she would have him imprisoned. But the Prophet Yusuf (as) was utterly determined. He immediately sought refuge in Allah and sought His help in all sincerity:
"He said, 'My Lord, the prison is preferable to me than what they call on me to do. Unless You turn their guile away from me, it may well be that I will fall for them and so become a man of ignorance.' His Lord replied to him and turned away from him their female guile and deviousness. He is the One Who Hears, the One Who Knows. (Surat Yusuf, 33-34)
Although the Prophet Yusuf's (as) innocence was obvious, they took a ruthless decision and cast him into a dungeon, where he spent the next several years.
Following the long years of imprisonment, a lot of auspicious events determined by Allah in the destiny He had determined took place. Eventually the country's ruler learned of the Prophet Yusuf's (as) moral virtues, trustworthiness and learning, and gave him an important post in the running of the country, appointing him head of the Egyptian Treasury. This is described as follows in the verses of the Qur'an.
The King said, 'Bring him to me straight away! so I may draw him very close to me.' When he had spoken with him, he declared, 'Today you are trusted, established in our sight.' He said, 'Entrust the country's stores to me. In truth I am a knowing guardian.' And thus We established Yusuf in the land so he could live in any place he pleased. We grant Our grace to anyone We will and We do not allow to go to waste the wage of any people who do good. (Surat Yusuf, 54-56)
The Prophet Yusuf (as), whose moral virtues right from childhood are a role model for all believers and who scrupulously abided by the limits set by Allah under all circumstances, was rewarded for these virtues and takwa with Allah's mercy, becoming very wealthy. Allah brought about a change that appeared 'impossible' on the surface and suddenly made him a powerful figure in the Egyptian administration. This, bringing about things that on the surface appear to be impossible, is Allah's wisdom and artistry. As we are told in the Qur'an; "How many a small force has triumphed over a much greater one by Allah's permission!" (Surat al-Baqara, 249), Allah rescues people from the most difficult and impossible-seeming situations and grants them victory over the deniers, all as a sign leading to faith. A believer's only duty is never to renounce his faith in Allah's promise and always to submit to Him.
This is very definitely a sign of Allah's compassion for the Prophet Yusuf (as). It was his fear of Allah, fortitude, and patience that bestowed such value on him, not his economic knowledge and expertise in Treasury matters. He never made any concessions regarding Islamic moral values. As a result of these virtues, our Lord bestowed wealth and rank on him in this world:
...there are men who proclaim His glory morning and evening,
not distracted by trade or commerce from the remembrance of Allah and the establishment of salat and the payment of zakat; fearing a day when all hearts and eyes will be in turmoil - so that Allah can reward them for the best of what they did and give them more from His unbounded favour. Allah provides for anyone He wills without reckoning. (Surat an-Nur, 37-38)
The Prophet Yusuf (as) was aware that everything he possessed (his material wealth, knowledge and intelligence) had all been given him by Allah. Deniers, on the other hand, imagine they come into possession of all they own through their own efforts, become swollen up with pride and are ungrateful for Allah's blessings. But despite being a prophet chosen by Allah, the Prophet Yusuf (as) still wished to be a Muslim and join the ranks of the pure. He was not certain of his place in the hereafter, but genuinely feared Allah and prayed to him humbly out of need.
My Lord, You have granted power to me on earth and taught me the true meaning of events. Originator of the heavens and earth, You are my Friend in this world and the Next. So take me as a Muslim at my death and join me to the people who are salihun'. (Sura Yusuf, 101)
This is the behaviour and mindset that befits a believer. By Allah's will, it is those who possess such moral values who will attain salvation in the hereafter.