As for His words, “Do not raise your voices above the voice of the Prophet … lest your deeds be nullified while you are unaware” (Q 49:2), and the ʿAṣr-prayer report, there is a difference of opinion about their precise implication.
The Exalted also says, “O you who believe, obey Allah and obey the Messenger, and do not nullify your deeds” (Q 47:33).
Al-Ḥasan [al-Baṣrī] said that this refers to sins and major transgressions; ʿAṭāʾ understood it to mean shirk (polytheism) and nifāq (hypocrisy); Ibn al-Sāʾib said it is caused by riyāʾ (showing-off) and samʿah (seeking a reputation); while Muqātil said it is by mann, reminding others of one’s favors. (1)
The reason for revelation was that a group of Bedouins came to the Messenger of Allah, blessings and peace be upon him, and said, “We have come in obedience, so we have a right over you.” This verse was then sent down, along with His words, “They count it as a favor to you that they have embraced Islam” (Q 49:17). (2)
What is transmitted from al-Ḥasan indicates that sins and major offenses can nullify (some) (3) deeds. If it is said, “He only meant their nullification through disbelief,” the reply is that disbelief is forbidden in and of itself and entails everlasting perdition,