Al-Anfal is an Arabic term that translates to the spoils of war. It refers to the property left behind by enemies captured by Muslims during their Jihad (fighting against their enemies); the ruling on it was mentioned in the Quran. Allah the Exalted Says (what means): {They ask you, [O Muhammad], about the spoils [of war]. Say, "The [decision concerning] spoils are for Allah and the Messenger. So, fear Allah and amend that which is between you and obey Allah and His Messenger, if you should be believers} [Quran 08:01]
Interpreters of the Quran mentioned three narrations on the reason of revelation of this Quran verse, which are as follows:
First narration: Imam Muslim narrated that Sa‘ad Ibn Abi Waqas said: ‘Four verses of the Quran have been revealed about me. I found a sword (among the remaining properties of enemies after the war)’. He (Sa‘ad) took it to the Prophet and said: “O Messenger of Allah, bestow it upon me.” The Messenger of Allah, sallallahu ‘alayhi wa sallam said: “Place it there.” Then he (Sa‘ad) stood up and the Messenger of Allah, sallallahu ‘alayhi wa sallam said to him: “Put it back to where you got it from.” (At this) he (Sa‘ad) said again: “Messenger of Allah, bestow it upon me.” The Messenger of Allah, sallallahu ‘alayhi wa sallam said: “Place it there.” Then he stood up and said: “Messenger of Allah, bestow it upon me, shall I be treated like one who has no share in (the booty)?” The Messenger of Allah sallallahu ‘alayhi wa sallam said: “Place it from where you got it.” At this point, the verse was revealed: {They ask you, [about the spoils of war. Say, "The [decision concerning] spoils are for Allah and the Messenger”} [Imam Ahmad, Imam Abu Dawood, Imam An-Nasa‘ee and Imam At-Tirmithi]
Second narration: Imam Abu Dawood and An-Nasa‘ee in As-Sunan Al-Kubra reported that Ibn ‘Abbas said that the Messenger of Allah said on the day of Badr (the first campaign of Muslims against their adversary): “He who does such-and-such, will have such-and-such (from the spoils of war)”. He (Ibn ‘Abbas ) said the young men preceded and the old men remained standing by the battle flags, and they did not move from there. When the victory of Allah has come, the old men said: ‘We were supporting you. If you had been defeated, you would have returned to us. Do not take this booty alone while we remain (deprived of it)’. The young men refused (to share) and said: ‘The Messenger of Allah has given it to us’. Then Allah the Exalted revealed this verse (which means): {They ask you, [O Muhammad], about the spoils [of war]. Say, "The [decision concerning] spoils is for Allah and the Messenger} until the Saying of Allah (what means) {[It is] just as when your Lord brought you out of your home [for the battle of Badr] in truth, while indeed, a party among the believers were unwilling} [Quran 08:05] Here Imam Abu Dawood added the following comments. He said: "This proved good for them. Similarly obey me. I know the consequence of this better than you." [Saheeh:Sheikh Al-Albani]
Third narration: Imam Ahmed reported from Ubadah Ibn As-Samit who said: 'We went with the Messenger of Allah to the battle of Badr. When the two armies met, Allah defeated the enemy and some of us pursued them to defeat them and kill those who fled. While another group of us headed to the battlefield collecting the spoils of war. And another group surrounded the Messenger of Allah to protect him so that the enemy could not attack him suddenly. When it was night and the various army groups went back to our camp, some of those who collected the spoils said, `We collected it, so no one else will have a share in it'. Those who went in pursuit of the enemy said, `No, you do not have more right to it than us. We kept the enemy away from the war spoils and defeated them'. Those who surrounded the Messenger of Allah to protect him said, `You do not have more right in it than us, we surrounded the Messenger of Allah to protect him so that the enemy does not attack him suddenly, so we were busy with Him'. Then the verse was revealed (which means): {They ask you, [O Muhammad], about the spoils [of war]. Say, "The [decision concerning] spoils are for Allah and the Messenger. So fear Allah and amend that which is between you and obey Allah and His Messenger} The Messenger of Allah divided it equally among Muslims. Allah's Messenger would give a fourth of the spoils when there was a surprise attack on the land of the enemy, and when there was a confrontation, then, a third to the people who returned. The Prophet used to dislike the spoils of war and said: “Strong fighters shall give some of their share to weak Muslim fighters.” [Imam Ahmad]
These are the reason for the revelation of these verses of the Quran (Quran 8:1-5), and the profound interpreters of the Quran had mentioned them, such as Imam At-Tabari, Imam Al-Baghawi, Imam Ibn Al-‘Arabi, Imam Ibn Attiya, Imam Al-Qurtubi, Imam Ibn Katheer, Imam Ibn ‘Ashoor, and Imam Ash-Shanqeeti .