Ibn ‘A’idh told that God’s Messenger went out to a man’s funeral, and when he was laid down ‘Umar b. al-Khattab said, "Do not pray over him, Messenger of God, for he was a wicked man. Thereupon God’s Messenger turned to the people and asked whether any of them has seen him engaged in anything which indicated that he was a Muslim, and when a man replied, "Yes, Messenger of God, he acted as guard one night in God's path,” he prayed over him, scattered dust over him, and then said, "Your companions think you are one of those who go to hell, but I testify that you are one of those who go to paradise.” He then said, "You will not be questioned, ‘Umar, about what people have done, but you will be questioned about the true religion.”*
* This is taken to mean that he will not be questioned about acts of disobedience, but about indication that one is a Muslim.
Narrated ‘Utba b. ‘Abd as-Sulami reported God’s Messenger as saying, “The slain are of three types:
(1) a believer who strives with his property and person in God’s path and when he meets the enemy fights till he is killed. (Of him the Prophet said that that martyr who has suffered trial is in God's tent under- His Throne and is not excelled by the prophets except in the degree of the prophetic office.) (2) A believer who mingles a good deed with another which is evil, who fights with his person and property in God’s path, fighting till he is killed when he meets the enemy. (Of him the Prophet said that it is a cleansing agent which has obliterated his sins and his errors, for the sword obliterates errors, and he will be introduced by whichever of the gates of paradise he wishes.) (3) A hypocrite who strives with his person and property, and when he meets the enemy fights till he is killed; but that one will go to hell, for the sword does not obliterate hypocrisy.”
‘Uqba b. ‘Amir told that he heard God's Messenger say when he was on the pulpit, “Prepare for them as much strength as you can. Strength is shooting; strength is shooting; strength is shooting.”
Narrated Fadala b. ‘Ubaid told of hearing ‘Umar b. al-Khattab say he had heard God’s Messenger saying, "The martyrs are of four types:
(1) a believing man whose faith is good who meets the enemy and is sincere towards God till he is killed, and that is the one to whom men will raise their eyes on the day of resurrection thus (raising his head till his cap fell off, but I do not know whether he meant ‘Umar’s cap or the Prophet’s cap); (2) a believing man whose faith is good, who meets the enemy and appears as if his skin had been torn by acacia thorns through cowardice, and then is killed by a random arrow, he being in the second class; (3) a believing man who mingles a good deed with another which is bad who meets the enemy and is sincere towards God till he is killed, that one being in the third class; (4) a believing man who has been dissipated who meets the enemy and is sincere towards God till he is killed, that one being in the fourth class.”
Tirmidhi transmitted it, saying this is hasan gharib tradition.