“None of you shall be saved by his works.” A man said, “Not even yourself, O Messenger of Allah?” He said, “Not even myself, unless Allah covers me with a mercy from Him. But strive to be right” (Muslim, 4.2169: 2816).
Imam Nawawi comments:
The outward purport of these hadiths [n: Muslim relates several] bears out the position of Islamic orthodoxy that no one deserves recompense or paradise for his acts of obedience. As for the words of Allah Most High “Enter paradise for that which you have done” (Qur’an 16:32), and “That is paradise, which you have been bestowed for what you did before” (Qur’an 7:43), and similar verses that indicate that paradise is entered by virtue of works, they do not contradict these hadiths. Rather, the meaning of the verses is that entering paradise is because of works, although divinely given success (tawfiq) to do the works, and being guided to have sincerity in them, and their acceptability are the mercy of Allah Most High and His favor (Sharh Sahih Muslim, 17.160–61).
The true spiritual path is one of gratitude. Abu Sulayman al-Darani used to say, “How can a sane man be proud of his works, when his works are but a gift from Allah and a blessing from Him that he must thank Him for” (Nata’ij al-afkar, 1.114). And Abu Madyan says, “The crestfallenness of the sinner is better than the exulting of the obedient” (Diwan, 50).