Riyad as-Salihin, Book 12, Hadith 1310 (In-Book) ⓘ
Al-Bara (May Allah be pleased with him) reported: A man equipped with arms came to the Prophet and asked: "O Messenger of Allah! Should I go and fight or should I embrace Islam first?" He replied, "Enter in the fold of Islam and then fight." He embraced Islam and fought until he was killed. Thereupon the Messenger of Allah said, "He accepted Islam for a short time but was rewarded much."[Al-Bukhari and Muslim].
وعن البراء رضي الله عنه قال أتى النبي صلى الله عليه وسلم رجل مقنع بالحديد، فقال يا رسول الله أقاتل أو أسلم؟ قال: "أسلم، ثم قاتل" فأسلم، ثم قاتل فقتل، فقال رسول الله صلى الله عليه وسلم : عمل قليلا وأُجر كثيرًا" ((متفق عليه وهذا لفظ البخاري)) .