Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Allah, the Lord of Might, marvels at two men: one who rises for prayer from his bed and his quilt, from among his loved ones and his family, desiring My blessings and fearing My punishment; and one who is defeated while fighting in the way of Allah, and he knows that there is a sin upon him for the defeat and what reward there is in turning back, so he returns to the fight until he is martyred. Allah, the Lord of Might, says to His angels: 'Look at My servant, who turned back, desiring My blessings and fearing My punishment, and offered up his life.'"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18524