Bismillaahir Rahmaanir Raheem.
One of the most common misconceptions people have today is that none but the Khaleefah has the right to execute a person that insults Rasoolullaah Sallallaahu `Alayhi Wa Sallam, and such a misconception is to be expected when one sees the amount of ignorant people speaking on behalf of the deen, and evil scholars that try to change the deen from its original teachings to be a watered down version that the kuffaar will be happy with.
The reality is that whoever is capable of taking revenge upon the one that insults Rasoolullaah Sallallaahu `Alayhi Wa Sallam then he has the right to do so, regardless of whether it’s in a Muslim or kaafir country, because there is no treaty and security given to a person that insults Rasoolullaah Sallallaahu `Alayhi Wa Sallam.
Imaam Ibn Taymiyyah Rahimahullaah says in his magnificent Kitaab “As-Saarim Al-Maslool `Alaa Shaatimir Rasool” (The Unsheathed Sword Upon the one that Insults the Rasool Sallallaahu `Alayhi Wa Sallam) concerning a person who kills the one that insults Rasoolullaah Sallallaahu `Alayhi Wa Sallam before even giving the Khaleefah a chance to execute him:
“The most that can be said about that is that he is transgressing the position of the ruler, and the ruler may pardon the one who carried out a hadd punishment that must be carried out without referring the matter to him.
Although this was a Hadd punishment, it also comes under the heading of killing a Harbi (a kaafir in a state of war against Islaam) that needs to be obligatory killed, and it is permissible for anyone to kill a harbi. And upon this is carried the statement of (Hadhrat) Ibn `Umar Radhiallaahu `Anhu when he was told about a monk that insulted Rasoolullaah Sallallaahu `Alayhi Wa Sallam, he said: “If I heard him, I would kill him.”
Similar things happened at the time of Rasoolullaah Sallallaahu `Alayhi Wa Sallam such as the hypocrite who was killed by (Hadhrat) `Umar Radhiallaahu `Anhu without the permission of Rasoolullaah Sallallaahu `Alayhi Wa Sallam, when the hypocrite did not agree with the ruling of Rasoolullaah Sallallaahu `Alayhi Wa Sallam, then (a verse of the) Qur’aan was revealed approving that action. And there was the daughter of Marwaan who was killed by that man, and Rasoolullaah Sallallaahu `Alayhi Wa Sallam called him the supporter of Allaah and His Rasool (Sallallaahu `Alayhi Wa Sallam). That is because the one whose execution becomes necessary because of his plot to corrupt the religion is not like one who is executed because of a sin like adultery and the like.”
الوجه الثاني: أن ذلك أكثر ما فيه أنه افتئات على الإمام والإمام له أن يعفو عمن أقام حدا واجبا دونه.
الوجه الثالث: أن هذا وإن كان حدا فهو قتل حربي أيضا فصار بمنزلة قتل حربي تحتم قتله وهذا يجوز قتله لكل أحد وعلى هذا يحمل قول ابن عمر في الراهب الذي قيل له إنه يسب النبي صلى الله عليه وسلم فقال: لو سمعته لقتلته.
الوجه الرابع: أن مثل هذا قد وقع على عهد رسول الله صلى الله عليه وسلم مثل المنافق الذي قتله عمر بدون إذن النبي صلى الله عليه وسلم لما لم يرض بحكمه فنزل القرآن بإقراره ومثل بنت مروان التي قتلها ذلك الرجل حتى سماه النبي صلى الله عليه وسلم ناصرا لله ورسوله وذلك أن من وجب قتله لمعنى يكيد به الدين ويفسده ليس بمنزلة من قتل لأجل معصية من زنى ونحوه.
And Allaah knows best.