Sahih al-Bukhari 3126
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَنْ قَاتَلَ لِتَكُونَ كَلِمَةُ اللَّهِ هِيَ الْعُلْيَا فَهْوَ فِي سَبِيلِ اللَّهِ "
Narrated Abu Musa Al-Ash`ari:
A bedouin asked the Prophet, "A man may fight for the sake of booty, and another may fight so that he may be mentioned by the people, and a third may fight to show his position (i.e. bravery); which of these regarded as fighting in Allah's Cause?" The Prophet (ﷺ) said, "He who fights so that Allah's Word (i.e. Islam) should be superior, fights for Allah's Cause."
Full reference and source
Sahih al-Bukhari 3126 In-book : Book 57, Hadith 35 USC-MSA web (English) : Vol. 4, Book 53, Hadith 355 (deprecated)
View source on Sunnah.com (opens in a new tab)