Imam Sadiq (peace be upon him): Abu Basir said: I asked Imam Sadiq (peace be upon him) about the trials that befell Ayub (peace be upon him) — what was their cause? He said: "It was on account of a worldly blessing that Allah bestowed upon him, and he succeeded in giving thanks for it. Iblis, who at that time had not yet been driven from beneath the Throne, when he ascended and saw Ayub's boundless thanks, was seized with envy and said: 'O Lord, if Ayub gives You thanks, it is only because You have continually granted him blessings in the world; were You to deprive him of the world and its bounties, he would never thank You again.' Allah said: 'O Satan, I have given you power over his wealth and his children.' So Satan hastened to destroy Ayub's wealth and children, for he feared that the mercy of Allah would reach Ayub before he had done anything. After the destruction of his wealth and children, Ayub increased in thanks and praise to Allah. Satan submitted: 'O Allah, give me power over his crops and cultivation.' The address came: 'Do what you will.' So Satan, together with his helpers, went to Ayub's crops and cultivation and set them ablaze with his blast; yet Ayub again offered thanks and praise to Allah. Satan submitted: 'O Allah, give me power over his cattle and his flocks.' When he was permitted, he destroyed all of Ayub's livestock, and Ayub still increased in thanks and praise. This time Satan said: 'O Allah, give me power over his body!' So Allah gave him power [to blow] upon Ayub's body, which caused sores that covered him from the crown of his head to the soles of his feet. For a long time that affliction remained, and Ayub continually gave thanks and praise to Allah, until worms appeared in his body and would come out of him; he would put them back and say to them: 'Return to the place from which Allah created you.' Then the sores gave off such a stench that the people of the village drove him out and cast him onto a refuse-heap outside the town. His wife was Rahima, daughter of Yusuf (peace be upon him), and she would collect alms from the people to sustain their livelihood and bring them to Ayub. When Ayub's suffering and trial grew long and Iblis saw his patience once again, he summoned all his companions who were monks in the mountains and said: 'Come, let us go and ask this afflicted servant about the trial that has come upon him.' So they mounted their horses and mules; but when they drew near to Ayub, the animals were repelled by the foul stench and shied, so they were forced to walk to him on foot. Among them was a young man of tender years. They sat beside Ayub and asked him: 'O Ayub, tell us what sin you have committed that Allah has afflicted you with this trial which He has inflicted on no one else.' Ayub said: 'By the might of my Lord, He Himself knows that I never ate any food but that beside my table sat an orphan or a poor man sharing my meal, and never were two matters presented to me — both of them obedience to Allah — but that I chose the more burdensome of the two upon my body.' When that young man heard this, he said: 'Woe to you! You have compelled the Prophet of Allah to disclose and reveal acts of worship which he had performed in secret. By the clear ruling and the narrations reported on this subject, it is impossible for a prophet of Allah to be afflicted with something that causes people to be repulsed by him and flee from him, for in that case the very foundation of his prophethood would be undermined.' Ayub then said: 'If I were in the position of an adversary and disputant, I would present my proofs and arguments.' At this Allah sent toward him a cloud, from within which ten thousand — or six thousand — tongues spoke to him, saying: 'O Ayub, present your proofs, for indeed I am near to you and have always been near.' Ayub said: 'Seat me upon my knees,' and then he said: 'O Allah, You have afflicted me with this trial, while You know that never were two matters presented to me but that I chose the more difficult, and I never ate a meal but that an orphan was present at my table!' The address came: 'O Ayub, who made obedience and worship dear to you? Who granted you, at a time when all people were heedless of Me, the ability to praise, glorify, and magnify Me? Do you count as a favor upon Us that which We have bestowed as a favor upon you and freely given?' At this Ayub took up a handful of dust and placed it in his mouth, then said: 'You, O my Allah, are the One who accomplished these matters and granted me the ability to worship and give thanks.' Then Allah sent an angel to him and commanded him to strike the ground with his foot; a spring appeared, and Ayub washed himself in it, and at once became younger and healthier than he had been before. Then Allah caused a lush green garden to grow around him, and restored to him his wealth, family, crops, and flocks twofold, and Jibra'il sat beside him, engaged in conversation. At that moment his wife arrived with a piece of dry bread; when she saw the changed scene and observed two men, she cried out: 'O Ayub, what has befallen you?' Then Ayub called out to her, and when she came closer and saw Ayub whole and sound, she fell down in prostration of thanks. Suddenly Ayub noticed that his wife's hair had been cut short. This was because she had begged people for bread to stave off hunger, and since she had beautiful tresses, the people had said to her: 'Give us your hair and we will give you bread.' So she had cut her hair and given it to them and prepared food for Ayub. But Ayub, unaware of the story, became angry at this sight and swore to strike her a hundred lashes. Immediately it was revealed to him that his wife was innocent, and he was therefore grieved over his oath. Allah revealed to him that he should take a bundle of a hundred slender twigs and strike her a single blow with it, thereby fulfilling his oath — which he did. And Allah brought back to life his family who had all perished through the descent of the trial, and they lived out their days beside him. After Ayub's recovery he was asked: 'Which affliction from among all these trials was hardest and most severe upon you?' He said: 'The gloating of enemies.' Then Allah rained gold in Ayub's house until the house was carpeted with gold, and he would gather it up, and whenever the wind carried some of it away he would run after it and bring it back. Jibra'il said to him: 'O Ayub, are you not satisfied?' Ayub replied: 'Who is ever satisfied with the provision of his Lord?' It is narrated that when Ayub (peace be upon him) was overwhelmed by trial, he said: 'Now I will sit as one who disputes.' Allah the Exalted revealed to him: 'Speak.' He sat upon the ashes and said: 'O Lord, You Yourself know that whenever two matters were presented to me, both of which pleased You, I chose the harder of the two.' At that a call came forth from a white cloud, proclaiming in thousands of tongues: 'To whom does the favor belong?' Ayub placed the ashes upon his head and fell in prostration, saying: 'O Lord, the favor is Yours.' And Allah at once granted him relief."