And when He says, “Whoever comes with a good deed,” the deed is something that person has done, since he is the one who brings it. This therefore concerns what the servant does, not what is done to him.
The context of the verse makes this clear, for He mentions this while urging jihad and condemning those who stay behind. He, Most High, says:
“O you who believe, take your precautions, then advance in groups or advance all together. Among you is one who will surely hang back. If a calamity befalls you, he says, ‘Allah has blessed me, for I was not there with them.’ But if a bounty from Allah comes to you, he will surely say—as though there had never been any affection between you and him—‘If only I had been with them, I would have achieved a great triumph.’”
Thus He, glorified be He, commands jihad, condemns those who discourage others from it, and mentions how the believers sometimes suffer calamity in it and sometimes receive Allah’s bounty. A calamity befell them on the day of Uhud, concerning which He said:
“When a calamity befell you, although you had inflicted twice as much, did you say, ‘How did this happen?’ Say, ‘It is from your own selves.’”
On the day of Badr, they received Allah’s bounty through His granting them victory and support, as He, Most High, said:
“Allah certainly granted you victory at Badr when you were weak.”
Then He, glorified be He, said:
“Let those who trade the life of this world for the Hereafter fight in Allah’s cause. Whoever fights in Allah’s cause, whether he is killed or victorious, We will grant him a great reward. And why should you not fight in Allah’s cause and for the oppressed among men, women and children?”
—up to His words:
“Wherever you may be, death will overtake you, even if you are in lofty, fortified towers. If good befalls them, they say, ‘This is from Allah’; but if evil befalls them, they say, ‘This is from you.’”
These are the words of the disbelievers and hypocrites. When victory or other blessings come to them, they say, “This is from Allah.” But when humiliation, fear or other calamities befall them, they say: