Abu Hurairah (May Allah be pleased with him) reported:
A man came to the Messenger of Allah (ﷺ) and asked, "O Messenger of Allah! What shall I do if someone comes to me with the intention of taking away my property?" He replied, "Do not hand over it to him." The man asked, "What shall I do if he fights me?" The Messenger of Allah (ﷺ) said, "Then fight him." "What will be my position in the Hereafter if he has killed me?" The Messenger of Allah (ﷺ) replied, "In that case you are a martyr." The man asked: "What if I killed him?" The Messenger of Allah (ﷺ) replied, "He will be in the Hell- fire."[Muslim].
App reference: Book 12, Hadith 73
Arabic/English book reference: Book 12, Hadith 1357