DEFINATION OF SHAHEED (MARTYR)
Nawawi has enumerated [in Sharh Sahih Muslim (1/515) and Al-Majmu` (1/277)] seven explanations for why the martyr is called Shaheed:
(1) Because Allah and the Prophet have testified concerning his entry into Heaven
(2) Because he is alive before his Lord
(3) Because the angels of mercy witness the taking of his soul
(4) Because he will be among those who testify over nations on the Day of Resurrection
(5) Because his faith and good ending have outwardly been witnessed
(6) Because he has a witness to his death, namely his blood
(7) Because his soul immediately witnesses Heaven. Ibn Hajar has mentioned fourteen means by which a person can acquire the title, some of them specifically related to being killed in the path of Allah and others not. [See: Fath al-Bari (6/43)]
Jurists have given the technical definition of a martyr as follows:
According to the Hanafis: "One who is killed by the pagans, or is found killed in the battle bearing a mark of any wound, whether external or internal - such as blood emerging from an eye or the like." [Al-`Inayah published on the margins of Fath al-Qadeer (2/142) and Hashiyat Ibn `Abideen (2/268)]
"Anyone who is killed while fighting pagans, or rebels, or brigands, by a means attributed to the enemy - whether directly or by consequence - is a shaheed, anyone who is killed by a means not specifically attributed to [an action of] the enemy is not considered a shaheed." [Zayla`i's Tabyeen al-Haqa'iq, (1/247). See also Al-Bahr al-Ra'iq (2/211)]
According to the Malikis: "One who is killed while fighting warring unbelievers only, even if killed on Islamic land such as if the enemy attacked the Muslims, [even if he] did not fight on account of being unaware or asleep, [and even if] killed by a Muslim who mistook him for an unbeliever, or trampled by a horse, or mistakenly smitten by his own sword or arrow, or by having fallen into a well or from a cliff during the fighting." [Dardeer's Al-Sharh al-Kabeer, (1/425)]
According to the Shafi`is: "One who is killed in fighting unbelievers, facing and not running away, for the raising of Allah's word…and not for any worldly motive." [Mughni al-Muhtaj (1/350) and see Fath al-Bari (6/129)]
According to the Hanbalis: "One who dies in a battle with the unbelievers, whether male or female, adult or not, whether killed by the unbelievers, or by his own weapon in error, or by having fallen off his mount, or having been found dead with no mark, provided he was sincere." [Kash-shaf al-Qina`, 2/113. See also Al-Mughni (2/206)]
From the above, it transpires that the majority - apart from the Hanafis - do not consider the identity of the killing party to be a factor in determining whether the victim is a shaheed. The majority view emerges preferable, based on: i. A hadith narrated by Bukhari (4196) in which `Aamir while trying to kill an enemy man during the battle of Khaybar, mistakenly killed himself instead. Someone said he had invalidated his good deeds, but the Prophet said, "Whoever says that is lying (or mistaken). Verily, he is has two rewards," and he coupled two of his fingers, "He is a striver and a Mujahid." ii. A hadith narrated by Abu Dawud (2539) about a Sahabi who mistakenly hit himself with his own sword, and people asked, "Is he a shaheed?", whereupon it is reported that the Prophet said, "Yes, and I am a witness for him."
Some people may waver about the permissibility of martyrdom operations because the Mujahid is killing himself. In order to dispel this confusion, we may remind ourselves that the Shari`ah often gives a differing verdict about two actions which externally appear the same, but differ in the intentions behind them. E.g. Marrying a divorced woman is permissible, but doing so with the sole intention of making her permissible to the first husband is prohibited.
Paying back a loan with more than was borrowed is allowed, but if the excess is stipulated in the contract, it is prohibited, being riba. One who performs Jihad in order to raise aloft the word of Allah is a Mujahid, but one who fights for the sake of showing off bravery is among the first who will be taken to Hell.
Mistakenly striking oneself with one's own weapon makes one shaheed (according to the majority) but deliberately killing oneself to escape the pain of wounds makes one deserving of Hell.
These examples, all based on the hadith, "Verily, actions are only according to intentions…", clearly support the notion that the verdict concerning the shaheed does not differ based on who the killing party is, provided the intention is pure. So, one who has a bad intention and is killed by the enemy is deserving of the Fire, as would be the case if he kills himself out of pain. And, one who has a sincere intention will be in Heaven, whether he is killed be the enemy, or kills himself in error. And, one who helps in killing himself for the good of the religion will be in Heaven, like the boy, inshaa-Allah.