What was guaranteed for the one who leaves
Two outcomes and both of them are settled in advance.
انْتَدَبَ اللَّهُ لِمَنْ خَرَجَ فِي سَبِيلِهِ لاَ يُخْرِجُهُ إِلاَّ إِيمَانٌ بِي وَتَصْدِيقٌ بِرُسُلِي أَنْ أُرْجِعَهُ بِمَا نَالَ مِنْ أَجْرٍ أَوْ غَنِيمَةٍ
Intadaba-Llāhu li-man kharaja fī sabīlih, lā yukhrijuhu illā īmānun bī wa taṣdīqun bi-rusulī, an urjiʿahu bimā nāla min ajrin aw ghanīmah
Allah has undertaken for the one who goes out in His path, driven out by nothing but faith in Me and belief in My messengers, that He will return him with whatever he gained of reward or spoils,
Where this comes from
Or that He will admit him to the Garden. The clause in the middle is the qualifier: driven out by nothing but. It rules out every other reason a person might have had for going.
The full narration
Narrated Abu Huraira: The Prophet (ﷺ) said, "The person who participates in (Holy battles) in Allah's cause and nothing compels him to do so except belief in Allah and His Apostles, will be recompensed by Allah either with a reward, or booty (if he survives) or will be admitted to Paradise (if he is killed in the battle as a martyr). Had I not found it difficult for my followers, then I would not remain behind any sariya going for Jihad and I would have loved to be martyred in Allah's cause and then made alive, and then martyred and then made alive, and then again martyred in His cause
Source
Ṣaḥīḥ al-Bukhārī · 36
- Agreed upon as authentic (al-Bukhārī / Muslim)