(45) “Recite what has been revealed to you of the Book and establish prayer. Indeed, prayer restrains from shameful and evil deeds, and the remembrance of Allah is greater. Allah knows what you do.”
The Most High commands the recitation of His revelation, which He has sent down—namely, this magnificent Book. Reciting it means following it: obeying its commands, avoiding its prohibitions, being guided by its guidance, believing its reports, reflecting upon its meanings, and reciting its words. Thus, reciting its words is one part of the broader meaning of recitation. Since this is what reciting the Book means, it is evident that upholding the whole religion is included in reciting the Book. His words, “and establish prayer,” therefore mention the specific after the general because of prayer’s excellence, noble status, and beneficial effects. Among those effects is that “prayer restrains from shameful and evil deeds.”
Shameful deeds are all grave and abhorrent sins that human souls desire.
Evil deeds are all sins rejected by sound reason and natural disposition.
Prayer restrains from shameful and evil deeds because when a servant establishes it, fulfilling its pillars, conditions, and humility, his heart becomes illuminated, his inner being is purified, his faith increases, his desire for good grows stronger, and his desire for evil diminishes or disappears. Thus, continually offering prayer and carefully maintaining it in this manner necessarily restrains from shameful and evil deeds. This is among its greatest purposes and fruits. Yet prayer has an even greater and more important purpose: the remembrance of Allah that it contains in the heart, upon the tongue, and through the body. Allah the Most High created creation (1) solely to worship Him, and the finest act of worship they perform is prayer. It contains acts of servitude involving every bodily member in a way found in no other act of worship. He therefore said, “and the remembrance of Allah is greater.”
It is also possible that, after commanding prayer and praising it, He states that remembering Him outside prayer is greater than prayer itself, as held by most Quran commentators. The first interpretation, however, is more appropriate, because prayer is superior to remembrance outside it and because prayer itself—as stated above—is among the greatest forms of remembrance.
“Allah knows what you do,” whether good or evil, and He will recompense you for it with the fullest and most perfect recompense.