because at that hour the mosque was dark; there was no light by which one could tell who was present and who was absent. For that reason the two prayers most burdensome to them were the night prayer (‘Isha) and the dawn prayer (Fajr). Such hypocrites perform all their deeds only to be seen by people: they come to the prayer out of ostentation, they give in charity out of ostentation, and they even set out for jihad out of ostentation. Hence, any Muslim who shows off in his worship has resembled the hypocrites—may Allah protect us.
Allah the Exalted says, “So woe to those who pray, yet are heedless of their prayer” (Q 107:4–5); that is, they show off in their deeds, desiring that people see them and praise their acts of devotion. Showing off is a sin that falls under shirk (associating partners with Allah), and at times it may rise to major shirk. It is one of the hallmarks of hypocrisy. May Allah safeguard us and you from hypocrisy. Allah alone grants success.
1616 – Abu Hurayrah (may Allah be pleased with him) reported: I heard the Messenger of Allah ﷺ say, “Allah the Exalted said, ‘I am the One most free of need for partners. Whoever performs a deed in which he associates anyone else with Me, I abandon him and his act of shirk.’” Muslim related it.
[Explanation]
After citing in Riyad al-Salihin the Qur’anic verses that prohibit shirk—including the shirk of showing off—the author, may Allah have mercy on him, followed them with several hadiths. Among them is the hadith of Abu Hurayrah who said, “I heard the Prophet ﷺ say: ‘Allah the Exalted said, I am the One most free of need for partners. Whoever performs a deed…’”