Narrated Anas: While the Prophet, peace be upon him, was in a Ghazwa, he said, “Some people have remained behind us in Madinah. And we never crossed a mountain path or a valley, but they were with us (i.e. sharing the reward with us), as they have been held back by a (valid) cause.”
(4: 92- O.B. Sahih Al-Bukhari)