A Muslim, then, should frequently repeat this supplication: “Our Lord, do not let our hearts deviate after You have guided us; grant us mercy from Yourself—indeed, You are the Bestower” (8) [Āl ʿImrān 3:8]. He should also echo what the Messenger ﷺ often said: “O Turner of the hearts, keep my heart firm upon Your religion” (1). Let him ask his Lord for steadfastness and for a good ending, as the prophets prayed: “Cause me to die a Muslim and join me with the righteous” (101) [Yūsuf 12:101]. The essence of this plea is to seek a blessed conclusion, for “Actions are judged only by their endings” (2).
We ask Him—subḥānahu wa taʿālā (glorified and exalted be He)—to safeguard us from the deviation of hearts, and we ask Him—subḥānahu wa taʿālā—to grant us a noble ending. May Allah send His blessings, peace, and grace upon His servant and Messenger, Muhammad.