Sunan an-Nasa'i, Book 37, Hadith 131 (Nasa'i 4106)

It was narrated that Abu Ja'far said:

"I was sitting with Suwaid bin Muqarrin, and he said: The Messenger of Allah said: "Whoever is killed defending himself against injustice, he is a martyr."