Does Allah Enjoin Immorality or does He Prohibit it?
Brief description of the dubiety
In verse 90 of Surah al-Nahl, it has been revealed that Allah prohibits indecency and wrongdoing, but in verse 16 of Surah al-Isra, it mentions that when Allah decides to destroy a nation, He first enjoins immorality upon the affluent ones and those living in pleasure, then He punishes that nation. It is clear that immorality and sin are examples of indecency and wrongdoing. Therefore, these two verses, regarding the enjoining of immorality and the prohibition of it, appear to be contradictory.
Detailed description of the dubiety
Verses that say Allah prohibits immorality
In verse 90 of Surah al-Nahl, it says that: “Indeed Allah enjoins justice and kindness, and generosity towards relatives, and He forbids indecency, wrongdoing, and aggression. He advises you, so that you may take admonition.” This verse clearly states that Allah does not enjoin indecency, wrongdoing and aggression, and in fact He prohibits these evil things. Immorality and sin are also examples of indecency and wrongdoing, thus Allah prohibits any kind of immorality. There are also other verses following the same theme.
In Surah al-Araaf, verse 28 it says: “When they commit an indecency, they say, ‘We found our fathers practicing it, and Allah has enjoined it upon us.’ Say, ‘Indeed Allah does not enjoin indecencies. Do you attribute to Allah what you do not know?’”
Also in Surah al-Noor, verse 21 Allah says: “O you who have faith! Do not follow in Shaytan’s steps. Whoever follows in Shaytan’s steps [should know that] he indeed prompts [you to commit] indecent and wrongful acts. Were it not for Allah’s grace and His mercy upon you, not one of you would ever become pure. But Allah purifies whomsoever He wishes, and Allah is All-Hearing, All-Knowing.” This verse says that Shaytan enjoins indecency, and it is clear that Allah’s actions are in opposition to that of Shaytan’s.
Verse that says Allah enjoins indecency
In verse 16 of Surah al-Isra, it has been revealed: “And when We desire to destroy a town We command its affluent ones [to obey Allah]. But they commit transgression in it, and so the word becomes due against it, and We destroy it utterly.” Based on this holy verse, whenever Allah decides to destroy and punish a nation, He first enjoins immorality upon the affluent ones and those living in pleasure from amongst that nation, thus they become guilty of corruption and immorality, and in this way, they become deserving of a divine punishment and then the law of divine punishment is enforced upon them.
Based on verse 90 of Surah al-Nahl, Allah enjoins justice and kindness, and prohibits its opposite which is indecency and wrongdoing. Meanwhile, in verse 16 of Surah al-Isra, it says that not only does Allah not prohibit immorality from the affluent ones and those living in pleasure, but He enjoins it. So they become immoral and are deserving of a divine punishment. Therefore, with due attention to the fact that immorality is an example of indecency and wrongdoing, the enjoining of immorality in verse 16 of Surah al-Isra is in contradiction with the prohibition of indecency and wrongdoing in verse 90 of Surah al-Nahl.
A summarized response
At first glance, even though it seems that the command in verse 16 of Surah al-Isra pertains to immorality and sin, i.e. the verse seems to mean that Allah enjoins immorality and corruption; however with due attention to the verbal and non-verbal contexts, it becomes clear that the command pertains to ‘obey,’ i.e. the verse means that Allah enjoins obedience, but they turned away and committed immoral actions. Therefore there is no inconsistency between these two verses because Allah never, and in no verse whatsoever has ever enjoined immorality, indecency and wrongdoing.
A detailed response
Premise (the role of verbal and non-verbal context in speech)
There are many ways to ascertain the precise meaning of a speech and to understand the intent of the speaker. Among these ways is to pay close attention to the verbal and non-verbal contexts that surround a speech.
An analysis of verbal context
What is meant by verbal context is a context that is clearly specified in its speech. The mention of such a context results in the limitation and allocation of a word’s meaning. For example, a father tells his son: “Go and get some sheep meat from the butchers.” The word ‘meat’ can apply to many things, such as sheep meat, cow meat, camel meat, etc. Therefore, the speaker adds context to the speech to show that by ‘meat’ he does not mean just any meat. Verbal context itself can be stated in two ways: sometimes it is mentioned in the sentence itself or at the time of speech, and sometimes it is not mentioned at the time of speech, but it is possible that it was mentioned previously, or that it will be mentioned in the future. For example, a father has told his son many times in the past that he will not eat any meat except for the meat of a sheep. Now if one day this person says to his son: “Go and get meat from the butchers,” then the son knows that he must buy sheep meat, even though there was no context present in the father’s words. Due to the fact that in the past, his father stated that he only eats the meat of a sheep, there is context in this speech that his intent by ‘meat’ is the meat of a sheep.
An analysis of non-verbal context
Sometimes however, context is not in the form of a word, and a speaker may refrain from specifying a context due to it being very clear already. The reason for a context being clear can be because of various things. For example, something may be obvious among the people due to common or intellectual sense, and/or due to the necessity of culture and tradition, or other such reasons. In such an instance, the speaker, mindful of the fact that this is obvious to everyone, does not specify this context in his speech, but by not mentioning it, this does not mean that it is not intended. For example, a father tells his son: “Prepare the meat for lunch.” In his speech, he does not specify that he should not prepare expired or spoiled meat, because no one uses this kind of meat for consumption, and this matter on its own is an obvious context such that the speaker does not even see the need to emphasize upon it.
Analyzing the meaning of verse 16 of Surah al-Isra
In verse 16 of Surah al-Isra it has been revealed that: “We command its affluent ones.” It must be paid attention to the fact that the details of this command have not been mentioned in the speech; i.e. it has not been specified as to what the affluent ones of the nation have been commanded to. There are two possibilities that come to mind. Either ‘obeying’ is what Allah has commanded or ‘sin and immorality’ is the command; in other words there is a possibility that the intent of the verse is that Allah enjoins obeying, but there it also a possibility that the intent is that Allah enjoins immorality and sin. Perhaps even the second possibility, i.e. that Allah enjoins sin and immorality might be closer to mind; however, with due attention to the verbal and non-verbal contexts, it becomes clear that the specification of the command can only be ‘obeying.’ The important point is this that in order to correctly understand the meaning and intent of a verse, it is necessary to pay very close attention to the contexts involved in the passage.
Explanation of the verbal context on the meaning of verse 16 of Surah al-Isra
In the previous verse, i.e. verse 15 of Surah al-Isra, Allah says: “Whoever is guided is guided only for [the good of] his own soul, and whoever goes astray, goes astray only to its detriment. No bearer shall bear another’s burden. We do not punish [any community] until We have sent [it] an apostle.” The last sentence of this verse indicates that the Prophets are the conveyors of Allah’s commands and prohibitions to the people, and Allah would never punish a nation without first sending a Prophet to guide them. This is a divine tradition which was carried out with all of the nations. Fundamentally, punishing a nation before delivering an ultimatum is illogical and reprehensible. 
Allah commands and prohibits the people through the Prophets and no one would be made aware of these rules from Allah without an intermediary. Also, with due attention to the duty of the Prophets which is to guide the people towards Allah and salvation, it is clear that the Prophets commanded justice and kindness, and prohibited immorality, indecency and wrongdoing.
Verse 2 of Surah al-Jumuah also mentions this. “It is He who sent to the unlettered [people] an apostle from among themselves, to recite to them His signs, to purify them, and to teach them the Book and wisdom, and earlier they had indeed been in manifest error.”
A Prophet - whose duty it is to purify and teach a nation - would never command them to sin, immorality and corruption, because such a command is inconsistent with the purification and teaching of wisdom and it goes against the goal. So, the Prophets always commanded the obedience of Allah and never commanded sin and immorality, because commanding immorality was inconsistent with the duty of any Prophet. Therefore, the last part of verse 15 of Surah al-Isra states that the condition for the descent of divine punishment was an ultimatum upon the people through the Holy Prophets.
Later on in verse 16 of Surah al-Isra, much like the latter part of verse 15 of this Surah, mentions another condition for the coming down of a divine punishment and that is immorality. “And when We desire to destroy a town We command its affluent ones [to obey Allah]. But they commit transgression in it...” Allah’s command that has been mentioned in this verse does not reach the people except through the Prophets; and in the explanation of verse 15, it was stated that the Prophets only commanded obedience. Therefore, with due attention to these contexts, the meaning of this verse is as such: When Allah decides to punish a nation, He first commands the affluent ones and those living in pleasure to obedience through His Prophets, and this way an ultimatum is delivered. Subsequently, due to the disobedience and sin of the nation, and the immorality and corruption of the affluent ones, a punishment is descended upon them. In reality, with the accumulation of these two conditions of punishment - the sending of Holy Prophets to deliver an ultimatum and the people’s disobedience of Allah’s commands - a divine punishment then descends. Therefore, it is understood from the verse that Allah does not enjoin immorality. 
Explanation of the non-verbal context on the meaning of verse 16 of Surah al-Isra
No intellectual individual can accept that someone would command disobedience after an order that they themselves have given. Meaning that it is not logical that someone would issue an order, and this instruction is based on wisdom and has a goal, to then command disobedience and insubordination from their own order. For example, a father who seeks to train his own child would never tell his child to disobey his commands, because all of the advice or rules of such a father are in the way of training his child, and then encouraging disobedience and insubordination of these very commands goes completely against the father’s goals and his objectives, and such behaviour is not worthy of any intellectual.
Therefore, we can conclude that in verse 16 of Surah al-Isra the command is ‘obedience,’ not sin and immorality; because no intellectual would invite disobedience of one’s own command, let alone Allah, the Wise.
With this, it becomes clear that there is no contradiction between the verses, because all of the verses reveal that Allah commands obedience. The only instance in which there would have been a contradiction is if one verse commanded obedience and another verse commanded insubordination, however this is not the case as it is clear that verse 16 of Surah al-Isra also instructs obedience, not insubordination.
A headmaster of a school says to the teachers: “We need to expel the students who do not study from the school. You teachers need to ask and inform each of the guardians of these students, that if they do not study, we can can expel them at the end of the year. This way, the guardians of these students cannot object to it later on.” In the apparent form of the headmaster’s words, it has not been specified what is wanted from the students’ guardians. The headmaster only said: “Ask each of the guardians of these students,” but it has not clearly been stated as to what is wanted from them. Perhaps, the text “that if they do not study” can be interpreted this way that the headmaster wants the teachers to ask the guardians of the students to not let them study. However, it is clear that such an idea is incorrect, because there is a clear context that goes against such a possibility. If the teachers ask the guardians to not let the students study, then in this instance the guardians will definitely protest the expulsion of their students at the end of the year. The only instance in which the guardians cannot protest is if they were asked to let the students study and succeed. Fundamentally, the teachers whose duty is to teach, if they were to command them not to study then it is illogical, and the headmaster definitely did not ask this of them. Therefore, with due attention to these contexts, that which the headmaster definitely wanted from the teachers was for them to ask the guardians of the students to let their children study and get a passing grade. In reality, the result of such a request with due attention of the headmaster’s acquaintance with the students was their disobedience, and in conclusion a route to their expulsion would be smooth this way.
Verse 16 of Surah al-Isra is completely similar to this example, as Allah’s command was not to immorality, but the people were ordered to obedience through the divine Prophets, and when they disobeyed, then a divine punishment was descended upon them.
- Excerpt from a Lesson on Exegesis by Ayatullah Javadi Amoli, Surah al-Isra, Lesson 25
- Tafseer al-Mizan, Volume 13, Pages 57, 58 and 60