Qur'an: Recite that which has been revealed to you of the Book and keep up prayer; surely prayer prevents (one) from indecency and evil, and certainly the remembrance of Allah is the greatest, and Allah knows what you do. (29:45)
In this verse (quoted), the Prophet is enjoined to recite what has been revealed to him of the Qur’an because reciting the verses of the Qur’an is the best deterrent against idolatry, indecency and evil. This is accompanied by a command to maintain the prayer, which is the best of deeds. The reason for this command is given in the verse, surely prayer prevents (one) from indecency and evil.
‘Prevent’ (nahī) here means that the very nature of prayer restrains the one who offers it from indecency and evil, in the sense of hindering someone from performing them without preventing him completely.
Naturally, when God’s servant engages in prayers and repeats it five times a day, one day after another (and especially if he does this under the influence of a righteous society) this will restrain him from committing every kind of major sin that offends religious sense, such as murder, embezzling the wealth of orphans, fornication, sodomy, and everything that a healthy conscience and upright human nature would reject. And this works on the level of both contemplation and action.
First of all, because prayer calls to mind the belief in God’s absolute oneness, in prophethood and the Hereafter, it instills in the person a sense that he is speaking directly to his Lord through the sincerity of worship, seeking His assistance and asking Him to guide him upon his straight path, while seeking refuge from His wrath and from misguidance.
Secondly, prayer urges him to direct his body and soul towards the awesome realm of divinity, to remember his Lord’s praise and glory, to magnify and exalt Him, and finally to invoke God’s peace upon himself, his companions and all righteous servants of God. This is in addition to its motivating him to cleanse himself of all filth and impurity in his person and clothing, and to ensure that neither his clothes nor the place in which he prays has been unjustly taken from another, before he turns towards the House of his Lord.
Therefore, when the human being persists for a while in offering prayers with sincerity, this creates a fixed indisposition (malaka) in his soul in the form of an aversion to all kinds of indecency and wrongdoing. And had you been left to your own devices, who could have nurtured your soul to be so righteous or to be adorned with the etiquette of servanthood?
Commentators have given different opinions about the meaning of prayer in this verse. However, what the context suggests is that the reason given for maintaining the prayer – ‘the prayer prevents indecencies and wrongs’ – is only given to show that prayer is an act of worship whose performance nurtures a person’s spirituality which in turn discourages him from indecency and wrongdoing. Therefore, by praying a person cleanses his soul of such impurities and frees it from sins and misdeeds.
If you take a moment to reflect on the condition of some of those who associate themselves with Islam while simultaneously abandon their prayers you see that, because they forsake their prayers, they also forsake the duties of fasting, pilgrimage, almsgiving, khums and all other religious obligations; they do not distinguish between ritually pure and impure substances, nor permissible and forbidden things. Instead, they live their lives however they please. If you compare such a person with someone who observes even the minimum level of prayer necessary to fulfill his moral obligation, you will see he avoids many of the sins committed by one who abandons their prayers altogether and has more self-control. This is even if he does not pray a lot. Now, if you compare this with someone who takes his prayers more seriously, you will see that he – by the same token – is even more averse to sinning and in even greater control of himself.
Ref: Al-Mizan Eng. Vol. 31 (pub. by Tawheed Institute, 2019)