From the route of Abul-^Abbas ^Abdillah bin ^Abbas, may Allah accept both of their deeds, who said: One day I was behind the Prophet, sallallahu ^alayhi wa sallam.
The Prophet said, <<O Boy, I will teach you certain matters. Be keen to apply the orders of Allah, and then Allah will protect you. If you obey the orders of Allah, then Allah will help you. If you want to ask someone, it is better to ask Allah. If you seek help, then seek the help of Allah.
Do know that if the entire nation agreed to benefit you in something, they would only benefit you in something that Allah decreed and had it written for you. And if they agreed to harm you in something, they would only harm you in something that Allah decreed and had it written for you.
This decree is already established, for the writing pens have been lifted and the journals have dried out.>>
Narrated by at-Tirmidhiyy and he said this Hadith is Hasan Sahih.
In the narration of other than at-Tirmidhiyy, the Prophet said, <<Obey the orders of Allah and you will encounter the support of Allah. Be cognizant of applying the orders of Allah and Allah will help you in your times of difficulty. Do know that what was meant to pass you by was not meant to afflict you, and what has afflicted you was not meant to pass you by. Do know that triumph is associated with patience, and relief is associated with distress and along with hardships come facilities.>>