Hazrat Anas(ra) relates that the Holy Prophet(sa) passed by a woman who was crying by the side of a grave. He said to her, ‘Be mindful of thy duty to Allah and be steadfast.’ She retorted, ‘Leave me alone; you have not been afflicted as I have been.’ She had not known who he was. Someone told her, ‘That was the Holy Prophet(sa).’ She proceeded to the door of the Holy Prophet(sa) and not finding any doorman went in and said to him, ‘I had not recognised you.’ He said, ‘Steadfastness means to be resigned at the time of the first shock of grief.’ (Sahih Al-Bukhari, Kitab-ul-Jana’ iz, Babu Ziyaratil-Qubur)
Another important point that has been emphasised in the fifth condition is [to remain steadfast] no matter how hard the circumstances, how long the period of hardship, how apparent the worldly attractions, how likely the benefits from diverse worldly activities, and how luring the attractions offered by the worldly powers that tells you not to worry because: ‘as an Ahmadi, even as you maintain ties to the Jama‘at, you can still conduct your professional affairs, serve the Jama‘at, and sacrifice financially.’ All of these are caused by Dajjal [Antichrist] to move you away from Allah and the Jama‘at. Therefore, the Promised Messiah(as) says that if you have taken the pledge, stay away from these snares. Do not be misled by these attractions. Remain faithful to Allah. If you turn to Him, you belong to the Promised Messiah(as) and will receive everything. The following is a beautiful admonition of the Holy Prophet(sa) in this respect.
Hazrat Ibn-e-‘Abbas(ra) has related that: I was once riding with the Holy Prophet(sa). He said, ‘My dear child, I am going to teach you a few things: Keep Allah in mind, He will safeguard you; keep Allah in mind, you will find Him nearby. When in need, ask only of Allah; if you need help, ask Him alone for help. Remember, if the whole world joins together to benefit you, it can do nothing to benefit you, except if Allah wishes and decrees it for you. And if they all join to hurt you, they can do nothing to hurt you, except if Allah decrees the harm for you. The pens have been stored away and the ink has dried.” (Sunan-ut-Tirmadhi, Kitabu Sifatil Qiyamah, Bab No. 59)
Another version is:
Keep Allah in mind, you will find Him before you. Recognise Allah in times of ease, He will recognise you in times of hardship. Remember, what escaped you was not decreed for you; and what is decreed for you will definitely come to you. Remember, the help of Allah comes as a result of steadfastness, and times of ease and times of hardship are commingled, and every hardship is followed by times of ease. (Riad-us-Salihin Lil Imam An-Nawawi, Bab-ul-Muraqabah, Hadith No. 62)
Nothing that the Holy Prophet(sa) did was against the pleasure of Allah; yet, he prayed fervently, he prayed for the pleasure of Allah.
Hazrat Muhammad Bin Ibrahim(ra) narrates a hadith from Hazrat ‘Aishah(ra), ‘Once I was sleeping by the side of the Holy Prophet(sa). During a time at night I did not find him there. While searching around, my hand touched his feet while he was prostrating. He was praying, “Allah, I seek the protection of Thy pleasure against Thy displeasure; and I seek the protection of Thy forgiveness against Thy punishment. I cannot count the ways of praising Thee. You are as You have described Your Holy Self.”’ (Sunan-ut-Tirmadhi, Kitab-ud- Da‘wat, Babu Ma Ja’a fi ‘Aqdit-Tasbihi Bil-yad)
Another tradition says that:
Someone from Medina heard from Hazrat ‘Abdul Wahhab Bin al-Ward(ra) that Hazrat Mu‘awiyah(ra) wrote to Hazrat ‘Aishah(ra) requesting some advice. She replied, ‘Assalamo ‘Alaikum. I have heard the Holy Prophet(sa) say, “One who seeks the pleasure of Allah, even at the cost of displeasing some people, Allah is Sufficient for him against them. But he who displeases Allah for the sake of pleasing some people, Allah hands him over to those people.”’ (Sunan-ut-Tirmadhi, Kitab-uz-Zuhd, Babu Ma Ja’a fi Hifzil-Lisan, Hadith No. 2414)