Prayer and recitation of the Qur’an generate a real force pulling a person away from committing indecency and evil. But how is this accomplished?
The first mechanism which generates such an inhibitor through prayer and the reciting of the Qur’an is what is known in psychology as cognitive dissonance. A believer who prays attentively and who feels his humility in front of God as he listens to the recitation of the Qur’an sees himself as ‘one who believes in God and obeys His commandments.’ This true picture of himself is in direct conflict with that which is drawn as a result of committing what is evil and forbidden. This second picture makes him out as ‘one who disobeys God and pursues his desire.’
Psychologists have found out that the presence in a person’s mind of two highly conflicting pictures of himself causes him much trouble. He tries to remove this cognitive dissonance or contradiction in his self-image by removing its cause. In this case he tries to refrain from committing what is forbidden. This is the quality of the God-fearing believers mentioned in the Qur’an: Whenever they commit an indecency, they remember God, and pray for His forgiveness. They do not knowingly persist in doing the wrong they may have done. Alternatively, man may remove this contradiction by changing his beliefs concerning the behavior that gives rise to this cognitive dissonance. This is impossible for a believer who cannot imagine that indecency could be anything but disobedience to God as it is merely an illegitimate indulgence in pleasure and desire.
If, on the other hand, he continues to pursue both contradictory situations, then stress will continue to afflict him. He will feel the need to remove this conflict. This means that he has the motive to refrain from disobedience to God by committing sinful and indecent actions.
The second psychological mechanism by which prayer and reciting the Qur’an could work as an inhibitor preventing indulgence in indecency and the committing of sin is that of remembering God and being on the alert. A believer will not fall into sin if he is not forced to do so unless he happens to be in a state which psychologists term as a state of denial.
This means that the person concerned behaves as though something in particular does not exist when he knows it to exist. A believer commits sin and indecency only when he is in such a state of denial, turning a blind eye to the punishment he knows to incur for committing such actions.
Perhaps it is to this situation that the Prophet refers when he says: “An adulterer is not a believer when he commits adultery, and a thief is not a believer when he steals, etc.” This does not mean that at the moment of committing adultery or theft or drinking such a person was a total unbeliever, having rejected the faith completely. It only means that he was not in a state of a fully alert believer who is conscious of God. He certainly did not change his faith at the moment of committing his offense, but he overlooked his faith, keeping it away from his consciousness.
This is the same as a person who has had a heart attack ignoring his condition and insisting on exerting the sort of physical effort his doctors tell him he must not do because it involves a great risk to his life. He simply does not wish to live what he knows in the back of his mind to be true, namely that he has a weak heart and that he no longer has the sort of strength he used to have. The same applies to a believer who pursues his desire: he continues to be aware of all the fundamentals of faith and that his behavior is particularly reprehensible, but he keeps all this away from his mind, or psychologically denies it. In Islamic terminology, this is a state of deliberately overlooking the truth.
Here we can see the role of prayers, offered five times every day, requiring a Muslim to perform ablutions, stand up for prayer, and attend to its performance, including bowing and prostration. Moreover, the believer recites the Qur’an during prayer and at other times. All this makes it difficult for the believer to overlook the facts or psychologically deny what he knows to be true, which is that indulging in sin makes him liable to incur God’s punishment. This shows us clearly that prayer and reciting the Qur’an act as inhibitors of indecency and committing sin.
When a believer happens to slip and commit a sin, he is sure to remember and turn to God in repentance, seeking His forgiveness: “Those who, when they commit a gross indecency or wrong themselves, remember God and pray for the forgiveness of their sins.” (3: 135)

