Sahih Muslim Book 20, Hadith Number 4684.

Chapter : One who fights that the word of Allah is exalted fights in the way of Allah.

It has been narrated on the authority of Abu Musa Ash’ari that a desert Arab came to the Holy Prophet (may peace be upon him) and said: Messenger of Allah, one man fights for the spoils of war; another fights that he may be remembered, and another fights that he may see his (high) position (achieved as a result of his valour in fighting). Which of these is fighting in the cause of God? The Messenger of Allah (may peace be upon him) said: Who fights so that the word of Allah is exalted is fighting in the way of Allah.