مَا كَانَ لِأَهۡلِ ٱلۡمَدِينَةِ وَمَنۡ حَوۡلَهُم مِّنَ ٱلۡأَعۡرَابِ أَن يَتَخَلَّفُواْ عَن رَّسُولِ ٱللَّهِ وَلَا يَرۡغَبُواْ بِأَنفُسِهِمۡ عَن نَّفۡسِهِۦۚ ذَٰلِكَ بِأَنَّهُمۡ لَا يُصِيبُهُمۡ ظَمَأٞ وَلَا نَصَبٞ وَلَا مَخۡمَصَةٞ فِي سَبِيلِ ٱللَّهِ وَلَا يَطَـُٔونَ مَوۡطِئٗا يَغِيظُ ٱلۡكُفَّارَ وَلَا يَنَالُونَ مِنۡ عَدُوّٖ نَّيۡلًا إِلَّا كُتِبَ لَهُم بِهِۦ عَمَلٞ صَٰلِحٌۚ إِنَّ ٱللَّهَ لَا يُضِيعُ أَجۡرَ ٱلۡمُحۡسِنِينَ ١٢٠
Mā kāna li ahlil-madīnati waman hawlahum minal-a'rābi an yatakhallafū 'ar rasūlillāhi walā yarghabū bi anfusihim 'an nafsihī dhālika bi annahum lā yusībuhum zama'un walā nasabun walā makhmasatun fī sabīlillāhi walā yata'ūna mawti'an yaghīzul-kuffāra walā yanālūna min 'aduwwin naylan illā kutiba lahum bihī 'amalun sālihun innallāha lā yudī'u ajral-muhsinīn
It was not [proper] for the people of Madīnah and those surrounding them of the bedouins that they remain behind after [the departure of] the Messenger of Allāh or that they prefer themselves over his self.507 That is because they are not afflicted by thirst or fatigue or hunger in the cause of Allāh, nor do they tread on any ground that enrages the disbelievers, nor do they inflict upon an enemy any infliction but that it is registered for them as a righteous deed. Indeed, Allāh does not allow to be lost the reward of the doers of good.
Footnotes
507 In times of hardship. Rather, they should have been willing to endure with the Prophet (ﷺ) whatever was necessary for Islām.