Hadithcore
Riyad as-Salihin, 76

Ibn 'Abbas (May Allah be pleased with them) said:

When (Prophet) Ibrahim (Abraham) was thrown into the fire, he said: "Allah (Alone) is sufficient for us, and, He is the Best Disposer of affairs." So did Messenger of Allah Muhammad (ﷺ) when he was told: "A great army of the pagans had gathered against you, so fear them". But this (warning) only increased him and the Muslims in Faith and they said: "Allah (Alone) is sufficient for us, and He is the Best Disposer of affairs (for us)". <b>[Al-Bukhari]</b>.

الثالث‏:‏ عن ابن عباس رضي الله عنهما أيضاً قال‏:‏ ‏"‏حسبنا الله ونعم الوكيل، قالها إبراهيم صلى الله عليه وسلم حين ألقي في النار، وقالها محمد صلى الله عليه وسلم حين قالوا‏:‏ إن الناس قد جمعوا لكم فاخشوهم فزادهم إيمانا وقالوا‏:‏ حسبنا الله ونعم الوكيل‏:‏ ‏(‏‏(‏رواه البخاري‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Introduction, Hadith 76
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) Reliance on Allah is the way of all the prophets (peace be upon them). So, one should follow their example in supplication and reliance on Allah because they were the most afflicted of people.<br> 2) It shows the excellence of relying on Allah Almighty during times of difficulty and adversity.<br> Note:<br> Some ignorant people, who attached their hearts to other than Allah Almighty, go during times of adversity and affliction to seek the help of created beings and supplicate other than Allah to alleviate these adversities. By Allah, such action is the ultimate form of loss and failure, and it is at this point that faith is extinguished in their hearts. A person who is keen on preserving the light of faith shining in his heart must have hope in Allah Almighty, the Creator, and sever hope in creatures.
Related hadiths1
Compare isnād across 1 related chains →