Abu Musa Ashari reported,

An Arabi said to the Prophet ﷺ, "One man fights for 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 supreme is in the path of Allah."

Bukhari 3126

Sahih

حدثني محمد بن بشار حدثنا غندر حدثنا شعبة عن عمرو قال سمعت أبا وائل قال حدثنا

أبو موسى الأشعري رضي الله عنه قال

قال أعرابي للنبي ﷺ الرجل يقاتل للمغنم والرجل يقاتل ليذكر ويقاتل ليرى مكانه من في سبيل الله فقال من قاتل لتكون كلمة الله هي العليا فهو في سبيل الله

البخاري 3126صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Obligation of the fifth
Chapter
Whoever fights for spoils, does it reduce his reward
Numbering
Darussalam 3126
Bukhari 3126