And He—exalted is He—also says:
“When distress befalls you at sea, those whom you call upon vanish from your minds except Him; but when He delivers you safely to land, you turn away. Man is indeed ever-ungrateful.” (al-Isrāʾ 17:67)
He, majestic and sublime, further says:
“Say: ‘Tell me, if the punishment of Allah should come upon you, or the Hour should suddenly arrive, would you call upon anyone other than Allah—if you are truthful?’ No! It is Him alone you call upon, and, if He wills, He removes the affliction for which you implore Him; then you forget whatever partners you ascribe to Him.” (al-Anʿām 6:40–41)
Those whose prayers are granted because they acknowledge His Lordship and believe that He answers the plea of the distressed—if they are not sincere to Him in worship and not obedient to Him and His Messenger—receive only a fleeting enjoyment of this worldly life; for them there will be no share in the Hereafter.
The Most High says:
“Whoever desires the fleeting life, We hasten for him therein whatever We will, for whomever We will; then We consign him to Hell, where he will burn, condemned and banished. But whoever desires the Hereafter and strives for it as he ought, while he is a believer—such people, their striving is appreciated. To each—both these and those—we extend from the bounty of your Lord, and the bounty of your Lord is never withheld.” (al-Isrāʾ 17:18–20)
The Friend [Abraham], peace be upon him, prayed for sustenance for the people of faith, saying:
“Provide its inhabitants with fruits—those among them who believe in Allah and the Last Day.” (al-Baqarah 2:126)
Allah, exalted is He, then said:
“As for the one who disbelieves, I shall grant him enjoyment for a little while; then I shall drive him to the punishment of the Fire—how evil a destination!” (al-Baqarah 2:126)
Thus, not everyone whom Allah favors with provision or victory—whether in answer to his supplication or otherwise—is necessarily beloved to Him or under His patronage. He provides for believer and disbeliever alike, for the righteous and the wicked; He may even answer their prayers and grant them what they seek in this world, yet they will have no share in the Hereafter.
It has also been related that some unbelievers among the Christians once besieged a Muslim city, and their supplies were soon exhausted