A man came to the Prophet ﷺ and asked, "One man fights for the spoils, another fights to be remembered, and another fights to be seen for his standing. Which of them is in the path of Allah?"He replied, "Whoever fights so that the word of Allah may be the highest, he is in the path of Allah."
جاء رجل إلى النبي ﷺ فقال: الرجل يقاتل للمغنم والرجل يقاتل ليذكر، والرجل يقاتل ليرى مكانه، فمن في سبيل الله؟ قال: من قاتل لتكون كلمة الله هي العليا، فهو في سبيل الله.
Narrated by Bukhari in the Book of the Obligation of Khumus (3126), and Muslim in the Book of Leadership (1904), both from Muhammad bin Bashshar, who said, Muhammad bin Jafar narrated to us, Shubah narrated to us, from Amr bin Mura, who said, I heard Abu Waail say, Abu Musa Ashari narrated to us, and he mentioned it. The wording is Bukhari's, and Muslim's wording is similar.His saying, "That is better for you" [Saff 61:11], means that jihad in the path of Allah, the Exalted, is better for you in this world and the hereafter. For you have spoils of war in this world, and in the hereafter a reward with Allah, the Exalted.