A Muslim will not be killed in retaliation for a disbeliever
➊ It is narrated from Ali (may Allah be pleased with him) that the Messenger of Allah ﷺ said:
أن لا يقتل مؤمن بكافر
“A believer will not be killed in retaliation for a disbeliever.”
[Sahih: Irwa al-Ghalil: 266/7, 2209, Ahmad: 119/1, Nasa’i: 19/8, Abu Dawud: 4530, Kitab al-Diyat: Bab Ayuqad al-Muslim bil-Kafir, Sharh Ma’ani al-Athar: 192/3, Daraqutni: 98/3, Bayhaqi: 29/8, Nasa’i: 24/8]
➋ Abu Juhayfah (may Allah be pleased with him) says: I asked Ali (may Allah be pleased with him), “Do you people have anything else revealed through revelation besides the Quran?” He replied, “By the One who split the grain and created the soul, (I have nothing) except the understanding that Allah grants a person regarding the Quran, and what is in this sahifah (page).” I asked, “What is in this sahifah?” He said:
المؤمنون تتكافأ دمائهم وفكاك الأسير وأن لا يقتل مسلم بكافر
“The blood of all Muslims is equal, and the ransoming of the captive, and that no Muslim will be killed in retaliation for a disbeliever.”
[Ahmad: 79/1, Bukhari: 111, 1870, Kitab al-Ilm: Bab Kitabat al-Ilm, Abu Dawud: 4530, Nasa’i: 23/8, Tirmidhi: 1412]
❀ There is a difference of opinion regarding the dhimmi.
(The majority) The dhimmi is also a disbeliever, so a Muslim will not be killed in retaliation for him.
(The Hanafis, Sha’bi (may Allah have mercy on him), Nakha’i (may Allah have mercy on him)) A Muslim will be killed in retaliation for a dhimmi.
(Malik (may Allah have mercy on him)) A Muslim will not be killed in retaliation for any disbeliever, unless the Muslim kills him by deception.
(Shafi’i (may Allah have mercy on him)) A Muslim will not be killed in retaliation for a disbeliever.
[Nayl al-Awtar: 446/4, Al-Umm lil-Shafi’i: 25/6, Al-Mabsut: 131/26, Al-Mughni: 466/11, Bidayat al-Mujtahid: 399/2]
The evidence of those who hold that a Muslim will be killed in retaliation for a dhimmi is this:
لا يقتل مؤمن بكافر ولا ذو عهد فى عهده
“A Muslim will not be killed in retaliation for a disbeliever, nor a person under a covenant (a dhimmi) during his covenant.”
[Sahih: Sahih Abi Dawud: 3797, Kitab al-Diyat: Bab Ayuqad al-Muslim bil-Kafir, Abu Dawud: 4530, Ahmad: 180/2]
(The preponderant view) All this hadith says is that the dhimmi will not be killed before he breaks the covenant. It does not make clear that a Muslim will be killed in retaliation for a dhimmi, nor is there any evidence on this that can be used as proof (therefore it appears that a Muslim will not be killed in retaliation even for a dhimmi).
[Al-Sayl al-Jarrar: 394/4, Nayl al-Awtar: 446/4, Fiqh al-Sunnah: 26/3, Subul al-Salam: 1581/3]