It is narrated from Hazrat Ikrimah (may Allah have mercy on him): When this verse was revealed «إِلَّاتَنْفِرُوايُعَذِّبْكُمْعَذَابًاأَلِيمًاوَيَسْتَبْدِلْقَوْمًاغَيْرَكُمْ», the hypocrites said: "There are some people who did not go out for jihad, so have they perished?" Whereas there was a group that stayed behind to acquire knowledge of the religion «لِيَتَفَقَّهُوافِيالدِّينِ», and about them Allah said «وَالَّذِينَيُحَاجُّونَفِياللَّهِمِنْبَعْدِمَااسْتُجِيبَلَهُ».
Hadith Referenceسنن سعید بن منصور / كتاب الجهاد / 4072
Hadith Takhrij«أخرجه سعيد بن منصور فى «سننه» ترقيم الدرالسلفية برقم:، 1051، 2896»