Sayyiduna Utbah bin Abd al-Sulami (may Allah be pleased with him), who was one of the Companions of the Messenger of Allah (peace and blessings be upon him), said: The Messenger of Allah (peace and blessings be upon him) said: "Those who are killed are three kinds of men: A believer who strives in the path of Allah with his life and wealth until he meets the enemy, and he fights until he is killed. He is the martyr who takes pride, who will be in the tent of Allah beneath His Throne; the Prophets are superior to him only by the rank of prophethood. And a believing man who has burdened himself with sins and wrongs; he strives with his wealth and life in the path of Allah until he meets the enemy and is killed. This is a purifier for his sins and wrongs; indeed, the sword wipes away wrongs. And he will be admitted through whichever gate of Paradise he wishes, for it has eight gates, some of which are better than others, and Hell has seven gates. And a hypocrite man who strives with his life and wealth in the path of Allah until he meets the enemy, and he fights until he is killed. This one will be in the Fire, for the sword does not wipe away hypocrisy."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14383