The Messenger of Allah ﷺ said that Allah says, "The one who strives in My path is under My guarantee. If I take his soul, I will grant him Paradise as his inheritance, and if I return him, I will return him with reward or spoils."
قال رسول الله ﷺ: يعني يقول الله عز وجل: المجاهد في سبيلي هو علي ضامن إن قبضته أورثته الجنة، وإن رجعته رجعته بأجر أو غنيمة.
Tirmidhi (1620) narrated it, and this is his wording, as did Ibn Abu Asim in al-Jihad (45), by way of Mutamir bin Sulayman, who said, Marzuq Abu Bakr narrated to me, from Qatada, from Anas, and he related it. Tirmidhi said, "This is a sahih hadith, gharib from this angle."I say, its isnad is hasan because of Marzuq Abu Bakr, who is the Basran, freed slave of Talha bin Abdul-Rahman Bahili. There is disagreement about him, but his hadith is hasan, and Abu Zura confirmed him as reliable.On this subject, there is also what was narrated from Ibn Umar, from the Prophet ﷺ, relating from his Lord , who said, "Whichever of my servants goes out striving in My cause seeking My good pleasure, I guarantee that I will bring him back with whatever reward or spoils he has gained, and if I take his life, I will forgive him and show him mercy." Nasai (3126) and Ahmad (5977) narrated it by way of Hammad bin Salama, from Yunus, from Hasan Basri, from Ibn Umar, and he related it.There is disagreement about whether Hasan Basri heard directly from Ibn Umar. Ibn Hibban and Hakim denied it, while Ibn Madini, Ibn Main, Ahmad, and Abu Hatim Razi affirmed it, and this is the accepted view. However, Hasan was known to practice tadlis, and here he narrated using an ambiguous form of transmission (an'ana).