فَاسْتَجَابَ لَهُمْ رَبُّهُمْ اَنِّيْ لَآ اُضِيْعُ عَمَلَ عَامِلٍ مِّنْكُمْ مِّنْ ذَكَرٍ اَوْ اُنْثٰى ۚ بَعْضُكُمْ مِّنْۢ بَعْضٍ ۚ فَالَّذِيْنَ هَاجَرُوْا وَاُخْرِجُوْا مِنْ دِيَارِهِمْ وَاُوْذُوْا فِيْ سَبِيْلِيْ وَقٰتَلُوْا وَقُتِلُوْا لَاُكَفِّرَنَّ عَنْهُمْ سَيِّاٰتِهِمْ وَلَاُدْخِلَنَّهُمْ جَنّٰتٍ تَجْرِيْ مِنْ تَحْتِهَا الْاَنْهٰرُۚ ثَوَابًا مِّنْ عِنْدِ اللّٰهِ ۗ وَاللّٰهُ عِنْدَهٗ حُسْنُ الثَّوَابِ ( آل عمران: ١٩٥ )
Fastajaaba lahum Rabbuhum annee laaa Udee'u 'amala 'aamilim minkum min zakarin aw unsaa ba'dukum mim ba'din fal lazeena haajaroo wa ukhrijoo min diyaarihim wa oozoo fee sabeelee wa qaataloo wa qutiloo la ukaffiranna 'anhum saiyi aatihim wa la udkhilanna hum Jannnatin tajree min tahtihal anhaaru sawaabam min 'indil laah; wallaahu 'indahoo husnus sawaab (ʾĀl ʿImrān 3:195)
And their Lord responded to them, "Never will I allow to be lost the work of [any] worker among you, whether male or female; you are of one another. So those who emigrated or were evicted from their homes or were harmed in My cause or fought or were killed – I will surely remove from them their misdeeds, and I will surely admit them to gardens beneath which rivers flow as reward from Allah, and Allah has with Him the best reward." (Ali 'Imran  : 195)
1 Mufti Taqi Usmani
So, their Lord answered their prayer: “I do not allow the labour of any worker from among you, male or female, to go to waste. You are similar to one another. So, those who emigrated, and were expelled from their homes, and were tortured in My way, and fought, and were killed, I shall certainly write off their evil deeds, and shall certainly admit them into gardens beneath which rivers flow, as a reward from Allah. It is Allah with Whom lies the beauty of the reward.