Abu Huraira reported God’s messenger as saying, “None of you will be rescued by his works.” He was asked if not even he would, and replied, “Not even I unless God covers me with His mercy; but if you keep to the straight path, are moderate, pray morning and evening and part of the night, and earnestly practise moderation, you will reach [the goal].”
(Bukhari and Muslim.)