[Indeed, those who disbelieve spend their wealth to avert [people] from the way of Allah. So they will spend it] to the end of the verse.
When the Messenger of Allah defeated the people of Badr, they returned to Mecca and took what the caravan had brought from the Levant. They prepared themselves with it to fight the Prophet and sought the help of tribes from the tribes of the Arabs. Allah then revealed to His Prophet: [Indeed, those who disbelieve spend their wealth] up to His saying: [So that Allah may distinguish the wicked from the good], meaning: the expenditure of the believers from the expenditure of the disbelievers, [and place the wicked some of it upon others and heap them all together and put them into Hell] with them, [it is those who are the losers]. Muhammad said: You say, 'I heap the thing (arkumu al-shay') as a heaping (rakman)' when you place some of it upon others, and 'rakam' (the heap) is the noun.
﴿إِنَّ الَّذِينَ كَفَرُوا يُنْفِقُونَ أَمْوَالَهُمْ لِيَصُدُّوا عَنْ سَبِيلِ اللَّهِ فَسَيُنْفِقُونَهَا﴾ الآيَةَ.
لَمَّا هَزَمَ رَسُولُ اللَّهِ أَهْلَ بَدْرٍ، رَجَعُوا إِلَى مَكَّةَ، فَأَخَذُوا مَا جَاءَتْ بِهِ الْعِيرُ مِنَ الشَّامِ، فَتَجَهَّزُوا بِهِ لِقِتَالِ النَّبِيِّ، وَاسْتَنْصَرُوا بِقَبَائِلَ مِنْ قَبَائِلِ الْعَرَبِ، فَأَوْحَى اللَّهُ إِلَى نَبِيِّهِ: ﴿إِنَّ الَّذِينَ كَفَرُوا يُنْفِقُونَ أَمْوَالَهُمْ﴾ إِلَى قَوْله: (ل ١١٩) ﴿لِيَمِيزَ اللَّهُ الْخَبِيثَ مِنَ الطَّيِّبِ﴾ يَعْنِي: نَفَقَةَ الْمُؤْمِنِينَ مِنْ نَفَقَةِ الْكَافِرِينَ ﴿وَيَجْعَلَ الْخَبِيثَ بَعْضَهُ عَلَى بَعْضٍ فَيَرْكُمَهُ جَمِيعًا فَيَجْعَلَهُ فِي جَهَنَّم﴾ مَعَهم ﴿أُولَئِكَ هم الخاسرون﴾ قَالَ مُحَمَّدٌ: تَقُولُ: أَرْكُمُ الشَّيْءَ رَكْمًا؛ إِذَا جَعَلْتُ بَعْضَهُ عَلَى بعض، والركام الِاسْم.