Sincerity and Significance of Intentions and all Actions, Apparent and Hidden
Abu Musa Al-Ash'ari (May Allah be pleased with him) reported that Messenger of Allah صلى الله عليه وسلم was asked about who fights in the battlefield out of valour, or out of zeal, or out of hypocrisy, which of this is considered as fighting in the cause of Allah? He said: *"He who fights in order that the Word of Allah remains the supreme, is considered as fighting in the cause of Allah".*
[Al-Bukhari and Muslim].
Commentary: Since one's action will be evaluated in terms of intention, so he alone would be a Mujahid (warrior in the cause of Deen) who fights to glorify the Name of Allah.