Muslim scholars teach that Muslims should generally be truthful to each other... unless the purpose of lying is to "smooth over differences" or "gain the upper-hand over an enemy."
There are several forms of lying to non-believers that are permitted under certain circumstances, the best known being taqiyya (the Shia name). These circumstances are typically those that advance the cause of Islam - in some cases by gaining the trust of non-believers in order to draw out their vulnerability and defeat them.
Quran
Quran (16:106) - Establishes that there are circumstances that can "compel" a Muslim to tell a lie.
Quran (3:28) - This verse instructs believers not to take those outside the faith as friends, unless it is to "guard themselves" against danger, meaning that there are times when a Muslim may appear friendly to non-Muslims, even though they should not feel friendly.
Quran (9:3) - "...Allah and His Messenger are free from liability to the idolaters..." The dissolution of oaths is with pagans who remained at Mecca following its capture. They did nothing wrong, but were evicted anyway. (The next verse refers only to those who have a personal agreement with Muhammad as individuals - see Ibn Kathir vol 4, p 49)
Quran (66:2) - "Allah has already ordained for you the dissolution of your oaths..." For today's reader, the circumstances for betraying your word are not specified, leaving this verse open to interpretation. According to Yusuf Ali in his commentary: "if your vows prevent you from doing good, or acting rightly, or making peace between persons, you should expiate the vow." (Presumably, whatever advances the cause of Islam would qualify as 'doing good').
Quran (40:28) - A man is introduced as a believer, but one who had to "hide his faith" among those who are not believers.
Quran (2:225) - "Allah will not call you to account for thoughtlessness in your oaths, but for the intention in your hearts" (see also 5:89)
Quran (3:54) - "And they (the disbelievers) schemed, and Allah schemed (against them): and Allah is the best of schemers." The Arabic word used here for scheme (or plot) is makara, which means 'cunning,' 'guile' and 'deceit'. If Allah is supremely deceitful toward unbelievers, then there is little basis for denying that Muslims are allowed to do the same. (See also 8:30 and 10:21)
Taken collectively these verses are interpreted to mean that there are circumstances when a Muslim may be "compelled" to deceive others for a greater purpose.
Hadith and Sira
Sahih Bukhari (52:269) - "The Prophet said, 'War is deceit.'" The context is thought to be the murder of Usayr ibn Zarim and his thirty unarmed companions by Muhammad's men after they were "guaranteed" safe passage (see Additional Notes below).
Sahih Bukhari (49:857) - "He who makes peace between the people by inventing good information or saying good things, is not a liar." In other words, lying is permissible when the end justifies the means.
Sahih Bukhari (84:64-65) - Speaking from a position of power at the time, Ali confirms that lying is permitted in order to deceive an "enemy." The Quran defines the 'enemy' as "disbelievers" (4:101).
Sahih Muslim (32:6303) - "...he did not hear that exemption was granted in anything what the people speak as lie but in three cases: in battle, for bringing reconciliation amongst persons and the narration of the words of the husband to his wife, and the narration of the words of a wife to her husband (in a twisted form in order to bring reconciliation between them)."
Sahih Bukhari (50:369) - Recounts the murder of a poet, Ka'b bin al-Ashraf, at Muhammad's insistence. The men who volunteered for the assassination used dishonesty to gain Ka'b's trust, pretending that they had turned against Muhammad. This drew the victim out of his fortress, whereupon he was brutally slaughtered.
From Islamic Law:
Reliance of the Traveler (p. 746 - 8.2) - "Speaking is a means to achieve objectives. If a praiseworthy aim is attainable through both telling the truth and lying, it is unlawful to accomplish through lying because there is no need for it. When it is possible to achieve such an aim by lying but not by telling the truth, it is permissible to lie if attaining the goal is permissible (N:i.e. when the purpose of lying is to circumvent someone who is preventing one from doing something permissible), and obligatory to lie if the goal is obligatory... it is religiously precautionary in all cases to employ words that give a misleading impression... (See the Permissible Lying section on the Sharia page for more)
"One should compare the bad consequences entailed by lying to those entailed by telling the truth, and if the consequences of telling the truth are more damaging, one is entitled to lie."
Notes
The Hadith makes it clear that Muslims are allowed to lie to unbelievers in order to defeat them or protect themselves. There are several forms:
Taqiyya - Saying something that isn't true as it relates to Muslim identity (i.e whether one is a Muslim or what that means). This is a Shiite term: the Sunni counterpart is Muda'rat.
Kitman - Lying by omission. An example would be when Muslim apologists quote only a fragment of verse 5:32 (that if anyone kills "it shall be as if he had killed all mankind") while neglecting to mention that the rest of the verse (and the next) mandate murder in undefined cases of "corruption" and "mischief."
Tawriya - Intentionally creating a false impression by saying something that is technically true, when knowing that the listener will interpret it in a different way. This practice has a broader application than taqiyya.
Muruna - 'Blending in' by setting aside some practices of Islam or Sharia in order to advance others.
Though not called taqiyya by name, Muhammad clearly used deception when he signed a 10-year treaty with the Meccans (known as Hudaibiya) which allowed him access to their city while he secretly prepared his own forces for a takeover. The unsuspecting residents were easily conquered when he broke the treaty two years later. Some of the people in the city who had trusted him at his word were executed.
Another example of lying is when Muhammad used deception to trick his personal enemies into letting down their guard by pretending to seek peace. This happened in the case of Ka'b bin al-Ashraf (as previously noted) and later against Usayr ibn Zarim, a surviving leader of the Banu Nadir tribe, which had been evicted from their home in Medina by the Muslims.
Being a mudslime…the halfrican was lying as permitted and advocated for in their beliefs…
https://www.thereligionofpeace.com/pages/quran/taqiyya.aspx
Deception, Lying and Taqiyya
Does Islam permit Muslims to lie?
Muslim scholars teach that Muslims should generally be truthful to each other... unless the purpose of lying is to "smooth over differences" or "gain the upper-hand over an enemy." There are several forms of lying to non-believers that are permitted under certain circumstances, the best known being taqiyya (the Shia name). These circumstances are typically those that advance the cause of Islam - in some cases by gaining the trust of non-believers in order to draw out their vulnerability and defeat them. Quran
Quran (16:106) - Establishes that there are circumstances that can "compel" a Muslim to tell a lie. Quran (3:28) - This verse instructs believers not to take those outside the faith as friends, unless it is to "guard themselves" against danger, meaning that there are times when a Muslim may appear friendly to non-Muslims, even though they should not feel friendly.
Quran (9:3) - "...Allah and His Messenger are free from liability to the idolaters..." The dissolution of oaths is with pagans who remained at Mecca following its capture. They did nothing wrong, but were evicted anyway. (The next verse refers only to those who have a personal agreement with Muhammad as individuals - see Ibn Kathir vol 4, p 49)
Quran (66:2) - "Allah has already ordained for you the dissolution of your oaths..." For today's reader, the circumstances for betraying your word are not specified, leaving this verse open to interpretation. According to Yusuf Ali in his commentary: "if your vows prevent you from doing good, or acting rightly, or making peace between persons, you should expiate the vow." (Presumably, whatever advances the cause of Islam would qualify as 'doing good').
Quran (40:28) - A man is introduced as a believer, but one who had to "hide his faith" among those who are not believers.
Quran (2:225) - "Allah will not call you to account for thoughtlessness in your oaths, but for the intention in your hearts" (see also 5:89)
Quran (3:54) - "And they (the disbelievers) schemed, and Allah schemed (against them): and Allah is the best of schemers." The Arabic word used here for scheme (or plot) is makara, which means 'cunning,' 'guile' and 'deceit'. If Allah is supremely deceitful toward unbelievers, then there is little basis for denying that Muslims are allowed to do the same. (See also 8:30 and 10:21)
Taken collectively these verses are interpreted to mean that there are circumstances when a Muslim may be "compelled" to deceive others for a greater purpose. Hadith and Sira
Sahih Bukhari (52:269) - "The Prophet said, 'War is deceit.'" The context is thought to be the murder of Usayr ibn Zarim and his thirty unarmed companions by Muhammad's men after they were "guaranteed" safe passage (see Additional Notes below).
Sahih Bukhari (49:857) - "He who makes peace between the people by inventing good information or saying good things, is not a liar." In other words, lying is permissible when the end justifies the means.
Sahih Bukhari (84:64-65) - Speaking from a position of power at the time, Ali confirms that lying is permitted in order to deceive an "enemy." The Quran defines the 'enemy' as "disbelievers" (4:101).
Sahih Muslim (32:6303) - "...he did not hear that exemption was granted in anything what the people speak as lie but in three cases: in battle, for bringing reconciliation amongst persons and the narration of the words of the husband to his wife, and the narration of the words of a wife to her husband (in a twisted form in order to bring reconciliation between them)."
Sahih Bukhari (50:369) - Recounts the murder of a poet, Ka'b bin al-Ashraf, at Muhammad's insistence. The men who volunteered for the assassination used dishonesty to gain Ka'b's trust, pretending that they had turned against Muhammad. This drew the victim out of his fortress, whereupon he was brutally slaughtered.
From Islamic Law:
Reliance of the Traveler (p. 746 - 8.2) - "Speaking is a means to achieve objectives. If a praiseworthy aim is attainable through both telling the truth and lying, it is unlawful to accomplish through lying because there is no need for it. When it is possible to achieve such an aim by lying but not by telling the truth, it is permissible to lie if attaining the goal is permissible (N:i.e. when the purpose of lying is to circumvent someone who is preventing one from doing something permissible), and obligatory to lie if the goal is obligatory... it is religiously precautionary in all cases to employ words that give a misleading impression... (See the Permissible Lying section on the Sharia page for more)
"One should compare the bad consequences entailed by lying to those entailed by telling the truth, and if the consequences of telling the truth are more damaging, one is entitled to lie." Notes
The Hadith makes it clear that Muslims are allowed to lie to unbelievers in order to defeat them or protect themselves. There are several forms:
Taqiyya - Saying something that isn't true as it relates to Muslim identity (i.e whether one is a Muslim or what that means). This is a Shiite term: the Sunni counterpart is Muda'rat.
Kitman - Lying by omission. An example would be when Muslim apologists quote only a fragment of verse 5:32 (that if anyone kills "it shall be as if he had killed all mankind") while neglecting to mention that the rest of the verse (and the next) mandate murder in undefined cases of "corruption" and "mischief."
Tawriya - Intentionally creating a false impression by saying something that is technically true, when knowing that the listener will interpret it in a different way. This practice has a broader application than taqiyya.
Muruna - 'Blending in' by setting aside some practices of Islam or Sharia in order to advance others.
Though not called taqiyya by name, Muhammad clearly used deception when he signed a 10-year treaty with the Meccans (known as Hudaibiya) which allowed him access to their city while he secretly prepared his own forces for a takeover. The unsuspecting residents were easily conquered when he broke the treaty two years later. Some of the people in the city who had trusted him at his word were executed.
Another example of lying is when Muhammad used deception to trick his personal enemies into letting down their guard by pretending to seek peace. This happened in the case of Ka'b bin al-Ashraf (as previously noted) and later against Usayr ibn Zarim, a surviving leader of the Banu Nadir tribe, which had been evicted from their home in Medina by the Muslims.