The Ruling on the One Who Insults the Prophet of Allaah
Lately, the issue of those who swear at or insult the Prophet صلى الله عليه و سلم has come up. The following is some of what the scholars of Islām have said regarding this issue.
Ibn Taymiyyah RA said:
“The First Issue: That Whoever - be it Muslim or kāfir - Swears at the Prophet صلى الله عليه و سلم, Then It Is Obligatory to Execute Him
This is the Math’hab of the general mass of the People of Knowledge. Ibn Al-Munthir said: “The general mass of the People of Knowledge have formed consensus upon that the Hadd of the one who swears at the Prophetصلى الله عليه و سلم is execution. And from those who sad this was Mālik, Al-Layth, Ahmad and Is’hāq. And it is the Math’hab of Ash-Shāfi’ī” He said: “And it is mentioned from An-Nu’mān: He is not killed, that which they are upon from shirk is greater.”And Abū Bakr Al-Fārisī, from the companions of Ash-Shāfi’ī, mentioned the Ijmā’ of the Muslims upon that the Hadd of the one who swears at the Prophet صلى الله عليه و سلم is execution, just as the Hadd of he who swears at other than him is whipping. And this Ijmā’ that he mentioned is understood as being the Ijmā’ of the first generations from the Sahābah and the Tābi’īn, or that he meant with that, their Ijmā’ upon that the one who swears at the Prophetصلى الله عليه و سلم, it is obligatory to kill him if he is a Muslim. And likewise, Al-Qādhī ‘Iyādh restricted it, as he said: “The Ummah has formed consensus upon the execution of the one who belittles him or swears at him from the Muslims.” And the Imām Is’hāq Ibn Rāhūyah, one of the Great Imāms, said: “The Muslims have formed consensus upon that whoever swears at Allāh, or swears at His Messenger صلى الله عليه و سلم, or rejects anything from that which Allāh ‘Azza Wa Jall Revealed, or kills a Prophet from the Prophets of Allāh ‘Azza Wa Jall, that he is a kāfir due to that, even if he accepts everything that Allāh Revealed.” And Al-Khattābī said: “I do not know anyone from the Muslims who differs regarding the obligation of his execution.” And Muhammad Ibn Sahnūn said: “The scholars have formed consensus upon that the one who swears at the Prophet صلى الله عليه و سلم, belittling him, is a kāfir, and the threat of the Punishment of Allāh is upon him, and his ruling according to the Ummah is execution, and whoever doubts his kufr and his punishment, then he has disbelieved.”
The Clarification Of The Opinion Relating To The Ruling Of The One Who Swears
And the clarification of the opinion regarding it is that the one who swears, if he is a Muslim, then he disbelieves and is executed, without any difference, and it is the Math’hab of the Four Imāms and other than them. And those from the Imāms who have mentioned the Ijmā’ upon that have past, like Is’hāq Ibn Rāhūyah and other than him. And if he is a Thimmī, then he is executed also in the Math’hab of Mālik and the People of Al-Madīnah, and the mentioning of their phrasings will come. And it is the Math’hab of Ahmad and the Fuqahā’ of theHadīth. And Ahmad clearly stated that in many places.
Hanbal said: I heard Abū ‘Abdillāh saying: Everyone who swears at the Prophet صلى الله عليه و سلمor belittles him, whether he is a Muslim or a kāfir, then execution is upon him. And I see that he should be executed and not given Istitābah.” He said: And I heard Abū ‘Abdillāh saying: “Everyone who breaks the ‘Ahd and innovates an innovation in Islām like this, then I see execution upon him, they were not given the ‘Ahd and the Thimmah upon this.” And likewise, Abū As-Saqr said: I asked Abū ‘Abdillāh about a man from the People of Thimmah who swears at the Prophet صلى الله عليه و سلم, what is upon him? He said: If the Bayyinah is established upon him, then whoever swears at the Prophet صلى الله عليه و سلمis executed, whether he is a Muslim or a kāfir.” Both narrated by Al-Khallāl
And he said in the narration of ‘Abdullāh and Abī Tālib, and he was asked about someone who swears at the Prophet صلى الله عليه و سلم, he said: “He is executed.” It was said to him: “Are there Ahādīth regarding it?” He said: “Yes. Ahadīth, from them the Hadīth of the blind man who killed the woman. He said: I heard her swearing at the Prophet صلى الله عليه و سلم. And theHadīth of Husayn, that Ibn ‘Umar said: Whoever swears at the Prophet صلى الله عليه و سلم is executed. And ‘Umar Ibn ‘Abdil-‘Azīz said: He is executed. And that is because whoever swears at the Prophet صلى الله عليه و سلم is a murtadd, and no Muslim swears at the Prophet صلى الله عليه و سلم.”
‘Abdullāh added: “I asked my father about one who swears at the Prophet صلى الله عليه و سلم, is he given Istitābah?” He said: “Execution has become obligatory upon him, and he is not givenIstitābah. Khālid Ibn Al-Walīd killed a man who swore at the Prophet صلى الله عليه و سلم and did not give him Istitābah.” Both narrated by Abū Bakr in “Ash-Shāfī” And in the narration of Abī Tālib: “Ahmad was asked about the one who swears at the Prophet صلى الله عليه و سلم. He said: He is executed. He has nullified the ‘Ahd.” And Harb said: I asked Ahmad about a man from the People of Thimmah who swears at the Prophet صلى الله عليه و سلم. He said: He is executed if he swears at the Prophet صلى الله عليه و سلم.” Both narrated by Al-Khallāl, and he clearly stated this in other than these answers. So all of his sayings are clear statements regarding the obligation of executing him, and in that he has nullified the ‘Ahd, and there is nothing from him different than this. And likewise was mentioned from all of his companions, the earlier and the later of them, they did not disagree on that.” 
Imām ‘Abdul-Qādir Ibn ‘Abdil-‘Azīz said :
“Secondly: The Permissibility of Assassinating the Muhārib Disbeliever
The Muhārib, in other words, the one who has no covenant, and the Sunnah is narrated with that (i.e. assassination) regarding those whose harm is severe towards Allāh and towards His Messenger صلى الله عليه و سلم. And an indication of that is narrated in His, the Most High’s, statement:
فَاقْتُلُواْ الْمُشْرِكِينَ حَيْثُ وَجَدتُّمُوهُمْ وَخُذُوهُمْ وَاحْصُرُوهُمْ وَاقْعُدُواْ لَهُمْ كُلَّ مَرْصَدٍ
…then kill the mushrikīn wherever you find them, and capture them and besiege them, and prepare for them each and every ambush. 
Al-Qurtubī said, “… and prepare for them each and every ambush. In other words, wait for them in the places of heedlessness where they conduct reconnaissance. And this is an evidence for the permissibility of assassinating them prior to the Da’wah.” I say: The statement of Al-Qurtubī: “…prior to the Da’wah…” in other words, to the one who had been reached by theDa’wah previously. And this verse: and prepare for them each and every ambush…; in it there is evidence for the permissibility of the surveillance and the reconnaissance and the spying upon the enemy.
As for the Sunnah, the Messenger of Allāh صلى الله عليه و سلم had ordered the killing of Ka’b Ibn Al-Ashraf and Abī Rāfi’ Ibn Abī Al-Huqayq, who were both from the Jews.
· As for Ka’b, he used to incite the mushrikīn against the Muslims, and he used to insult the Prophet صلى الله عليه و سلم, with his poetry and rhapsodize (write erotic poetry) against the women of the Muslims. And the story of his assassination was narrated by Al-Bukhārī and Muslim, as Al-Bukhārī narrated it from Jābir: “The Messenger of Allāh صلى الله عليه و سلم said, ‘Who is for Ka’b Ibn Al-Ashraf, as he has insulted Allāh and His Messenger?’ So Muhammad Ibn Maslamah stood up and said, ‘O Messenger of Allāh, would you like for me to kill him?’ He said, ‘Yes.’ He said, ‘Then give me permission to say something.’ He said, ‘Say it.’ So Muhammad Ibn Maslamah came to him.”  And in the Hadīth that Muhammad Ibn Maslamah, and those with him deceived Ka’b in (claiming) that they were frustrated with the Prophet صلى الله عليه و سلم and they deceived him, until they killed him, while he was in a well fortified fortress.
Ibn Hajar said, “And in the Mursal (narration) of ‘Ikrimah: ‘So the Jews became terrified, so they came to the Prophet صلى الله عليه و سلم and said, ‘Our leader was killed by assassination.’ So the Prophet صلى الله عليه و سلم reminded them about his deeds and what he used to incite against him, while insulting the Muslims.’ Ibn Sa’d added, ‘So they were frightened and did not say anything (further).” – until Ibn Hajar said – “And in it, there is the permissibility of killing the polytheist (mushrik) without Da’wah as long as the general Da’wah has reached him. And in it, there is the permissibility of saying that which is necessary during war, even if the one saying it did not really mean it.”  And Al-Bukhārī narrated this Hadīth in “The Book of Jihād: ‘Chapter of Lying in War’ and ‘Chapter of Assassinating the People of War’”.
I say: So whoever describes the assassination of the disbelievers who make war against Allāh and His Messenger صلى الله عليه و سلم as betrayal and the likes of that, or that Islām forbids that, then he is a misguided one who has Tak’thīb (i.e. does not accept the truthfulness) of the Book and the Sunnah. And An-Nawawī has said, “He – Al-Qādhī ‘Iyādh – said, ‘And it is not permitted for anyone to say that his killing was a betrayal. And one person said this in a gathering with ‘Alī Ibn Abī Tālib, may Allāh be pleased with him, so he ordered for his neck to be struck (i.e. decapitation).”  And this latter event was pointed out by Al-Qurtubī in the Tafsīr of His, the Most High’s, statement:
فَقَاتِلُواْ أَئِمَّةَ الْكُفْرِ
…then fight the leaders of disbelief. 
And Ibn Taymiyyah mentioned it in his book “As-Sāram Al-Maslūl ‘Ala Shātim Ar-Rasūl”. And he mentioned a story, which occurred between Mu’āwiyah and Muhammad Ibn Maslamah, may Allāh be pleased with them.
· As for Ibn Abī Al-Huqayq, he was a Jew from Khaybar and he was the merchant of Al-Hijāz, and he went to Makkah and enraged Quraysh against the Prophet صلى الله عليه و سلم until they gathered the confederates (Al-Ah’zāb) and it was the Battle of Al-Ah’zāb, and he was the igniter of its flame. Al-Bukhārī narrated from Al-Barā’ Ibn ‘Āzib who said, “The Messenger of Allāh صلى الله عليه و سلم sent men from the Ansār to Abī Rāfi’, the Jew, and he put ‘Abdullāh Ibn ‘Atīq in charge over them. And Abū Rāfi’ used to insult the Messenger of Allāh صلى الله عليه و سلمand would help against him. And he was in a fortress of his in the land of Al-Hijāz.”  And he narrated from him as well, that he said, “The Messenger of Allāh صلى الله عليه و سلم sent a group to Abī Rāfi’, then ‘Abdullāh Ibn ‘Atīq entered upon him in his house, at night, while he slept, and he killed him.”  And Ibn ‘Atīq deceived with many various deceptions until he killed him, as he deceived until he entered the fortress. Then he closed the doors of the houses of the Jews from outside. Then he went to Abī Rāfi’ and he would not enter any door except that he closed it from inside and he disguised his voice so that he would not be recognized. Ibn Hajar said, “And in the Hadīth from the benefits there is the permissibility of assassinating the mushrik who has been reached by the Da’wah but who persists, and the killing of the one who offers support against the Messenger of Allāh صلى الله عليه و سلم with his hand (i.e. physically) or with his money (i.e. financially) or with his tongue (i.e. verbally), and the permissibility of spying upon the people of war and looking for their inattentiveness, and being extremely dedicated in waging war against the mushrikīn and the permissibility of being ambiguous in speech, due to a benefit and the opposition of small numbers of the Muslims against numerous mushrikīn.”  And Al-Bukhārī narrated it within “The Book of Jihād: Chapter of Killing the Sleeping mushrik”.
· And regarding this issue, the Shaykh, ‘Abdur-Rah’mān Ad-Dawsarī, may Allāh be merciful to him, said in mentioning the levels of worship, in his Tafsīr of His, the Most High’s, statement:
إِيَّاكَ نَعْبُدُ وإِيَّاكَ نَسْتَعِينُ
You (Alone) we worship, and You (Alone) we ask for help. 
He said, “Then the preparation of strength in accordance with one’s ability is from the obligations of the religion, and from the necessities to establish it. So the one who correctly worships Allāh, is not afflicted by the postponement in this, let alone abandoning it or taking it as insignificant. And also, the worshipper of Allāh who is determined upon the Jihād in himself, would be carrying out the assassinations of the leaders of disbelief, from the callers to atheism and the outright permissibility (i.e. liberalism) and everyone who attacks of the revelation of Allāh or the one who puts forth his pen or his campaigns against the Clearly True (Hanīf) religion, because this one is an insulter of Allāh and His Messenger صلى الله عليه و سلم. It is not permissible for the Muslims in the regions of the Earth, from the specific (Scholars, Mujāhidīn, etc.) or the general ones (layman), to leave him living, because he is more harmful than Ibn Abī Huqayq, and others besides him, from those who the Messenger of Allāh صلى الله عليه و سلم recommended their assassination. So the abandonment of the assassinations of those who inherited from them (i.e. those who wage war against Allāh and his Messenger صلى الله عليه و سلم), in this time, is a removal of the last testament of the Al-Mustafā (i.e. the Prophet صلى الله عليه و سلم), and a terrible breach the worship of Allāh and a horrible hideous legitimizing of the axes of destruction against the religion of Allāh, and its emergence cannot be explained except by (saying there is) the absence of protective instincts (Ghīrah) towards the religion of Allāh, and any anger (on behalf) of His noble Face. And that is a great shortcoming in the love of Allāh and His Messenger and their glorification, which would not come from someone who has established the worship of Allāh upon its correct, intended meaning.” 
“As-Saarim Al-Maslool ‘Alaa Shaatim Ar-Rasool”: pg. 12-13
 This is taken from the Imaam’s book entitled: “Al-‘Umdah Fee I’daad Al-‘Uddah Lil-Jihaadi Fee Sabeelillaahi Ta’aala”: pg. 328-330
 Sūrat At-Tawbah, 5
 Hadīth #4,037
 “Fat’h Al-Bārī ”, Vol. 7/340
 “Sahīh Muslim Bi’Sharh’ An-Nawawī ”, Vol. 12/160
 Sūrat At-Tawbah, 12
 Hadīth #4,039
 Hadīth #4,038
 “Fat’h Al-Bārī ”, Vol. 7/345
 Trans. Note: Sūrat Al-Fātihah, 5
 From “Safwat Al-‘Āthār Wal-Mafāhīm Min Tafsīr Al-Qur’ān Al-‘Athīm ”, Vol. 1/268 by the Shaykh, ‘Abdur-Rah’mān Ad-Dawsarī; publication of “Dār Al-Arqam ”, 1404 H.