After the conquest of Makkah, while Muslims were busy with their lives in path of God; praying, fasting and doing charity work, the Hawazin and Thaqif tribe assembled an army to attack the Muslims. With news reaching the Prophet (p) of their plans, Prophet Muhammed and his people prepared to engage them. This occasion of war was called the battle of Hunayn (as verse 25 mentions). These verses (below) relate to this event.
Related Article: ‘An Historical Examination Of The Sword Verse – Surah 9:5‘
9:25 Allah has already given you victory in many regions and [even] on the day of Hunayn, when your great number pleased you, but it did not avail you at all, and the earth was confining for you with its vastness; then you turned back, fleeing.
9:26 Then Allah sent down His tranquillity upon His Messenger and upon the believers and sent down soldiers angels whom you did not see and punished those who disbelieved. And that is the recompense of the disbelievers.
9:27 Then Allah will accept repentance after that for whom He wills; and Allah is Forgiving and Merciful.
9:25 – This verse speaks about the battle of Hunayn, wherein the great of number of Muslims who went up against the aggressors – the Hawazin and Thaqif. The Muslims thought they could win the war because their military men were a lot more than Hawazin and Thaqif. Being confident with their numbers in the end some of the Muslims fled from them in battle.
9:26 – God sent His Angels from heaven to deal with those hostile enemies, who murdered many Muslims and were slain by the Angels. Those that were killed, refers to clan of Malik Ibn ‘Awf al-Dahmani, and to that of Kinanah Ibn ‘Abd Yalayl al-Thaqafi, 1400 years ago (Tanwir al-Miqbas min Tafsir Ibn ‘Abbas).
9:27 – Commentators are of the opinion that this verse relates to some among the Hawazin and Thaqif who attacked the Muslims, and later embraced Islam. That God will forgive them of their past transgressions against the Muslims (Tafsir Ibn Kathir, Ibn Juzayy, Tafsir al-Jalalayn, and Tanwir al-Miqbas min Tafsir Ibn ‘Abbas).
Tafsir Ibn Kathir (1301 – 1373 AD):
“News came to the Messenger of Allah that the tribe of Hawazin were gathering their forces to fight him, under the command of Malik bin `Awf An-Nadri, as well as, the entire tribe of Thaqif, the tribes of Banu Jusham, Banu Sa`d bin Bakr, a few people of Awza` from Banu Hilal and some people from Bani `Amr bin `Amir and `Awf bin `Amir. They brought their women, children, sheep and camels along, in addition to their armed forces and adequate supplies. The Messenger of Allah marched to meet them with the army that he brought to conquer Makkah, ten thousand from the Muhajirin, the Ansar and various Arab tribes. Along with them came the Tulaqa’ numbering two thousand men. The Messenger took them along to meet the enemy. The two armies met in Humayn, a valley between Makkah and At-Ta’if. The battle started in the early part of the morning, when the Huwazin forces, who were lying in ambush, descended on the valley when the Muslims entered. Muslims were suddenly struck by the ambush, the arrows descended on them and the swords struck them. The Huwazin commander ordered them to descend and attack the Muslims as one block, and when they did that, the Muslims retreated in haste, just as Allah described them. The Messenger of Allah remained firm in his position while riding his mule, Ash-Shahba’. He was leading his mule towards the enemy, while his uncle Al-`Abbas was holding its right-hand rope and ﴿his cousin﴾ Abu Sufyan bin Al-Harith bin `Abdul-Muttalib was holding the left rope. They tried to hold the mule back so it would not run faster toward the enemy. Meanwhile, the Messenger of Allah was declaring his name aloud and saying,
(Then after that Allah will accept the repentance of whom He wills. And Allah is Oft-Forgiving, Most Merciful.) Allah forgave the rest of Huwazin when they embraced Islam and went to the Prophet , before he arrived at Makkah in the Ji`ranah area. This occurred twenty days after the battle of Hunayn. The Messenger gave them the choice between taking those who were prisoner or the war spoils they lost, and they chose the former. The Prophet released six thousand prisoners to them, but divided the war spoils between the victors, such as some of the Tulaqa’, so that their hearts would be inclined towards Islam. He gave each of them a hundred camels, and the same to Malik bin `Awf An-Nasri whom he appointed chief of his people (Huwazin) as he was before. Malik bin `Awf said a poem in which he praised the Messenger of Allah for his generosity and extraordinary courage.” (Tafsir Ibn Kathir Surah 9: Online Source)
“God has already helped you on many fields, of battle, such as Badr, and [against] Qurayza and al-Nadir, and, remember, on the day of Hunayn — a valley between Mecca and Ta’if; that is, [remember] the day on which you fought Hawazin — this was in Shawwal in year 8 [of the Hijra], when (idh substitutes for yawma, ‘the day’) your vast numbers were pleasing to you, such that you were saying, ‘We shall not be defeated today, not on account of our being few’: and they numbered 12,000, while the disbelievers were 4,000); but it availed you nothing and the earth, for all its breadth (bi-ma rahubat, the ma refers to the verbal noun, in other words [understand it as being] ma‘a rahbiha, ‘despite its breadth’), it was straitened for you, such that you could not find a place in which you felt secure, because of the severe fear that afflicted you; then you turned back, retreating, fleeing: the Prophet (s), however, on his white mule remained firm, with only al-‘Abbas by his side, while Abu Sufyan was charging on his mount.” (Tafsir al-Jalalayn Surah 9: Online Source)
Tanwir al-Miqbas min Tafsir Ibn ‘Abbas (d. 1075 AD):
“(Allah hath given you victory on many fields) on many battlefields (and on the day of Hunayn) and especially on the day of Hunayn, a valley between Mecca and Ta’if, (when ye exulted in your multitude) when you were pleased by your sheer numbers. They were then 10,000 men (but it availed you naught) but your multitude did not prevent your defeat, (and the earth, vast as it is, was straitened for you) because of fear; (then ye turned back in flight) from the enemy, who consisted of 4,000 men…” (Tanwir al-Miqbas min Tafsir Ibn ‘Abbas on Surah 9: Online Source)
“33 The battle of Hunayn, a valley situated on one of the roads leading from Mecca to Ta’if, took place in the year 8 H., shortly after the conquest of Mecca by the Muslims. The latters’ opponents were the pagan tribes of Hawazin (in whose territory the valley lay) and their allies, the Band Thaqif. The Muslim army – reinforced by many newly-converted Meccans – comprised about twelve thousand men, whereas the Hawazin and Thaqif had only one third of that number at their disposal. Relying on their great numerical superiority, the Muslims were over-confident and, apparently, careless. In the narrow defiles beyond the oasis of Hunayn they fell into an ambush prepared by the tribesmen and began to retreat in disorder after heavy losses had been inflicted on them by the Bedouin archers. It was only the example of the Prophet and his early adherents (the Meccan muhajirun and the ansar from Medina) that saved the day and turned the initial rout of the Muslims into a decisive victory. It is to this battle that verses 25 and 26 refer, pointing out that true succour can come only from God, and that great numbers, ties of kinship and worldly wealth are of no avail if they are “dearer to you than God and His Apostle and the struggle in His cause” (see preceding verse).” 
Malik Ghulam Farid:
“1173. After the fall of Mecca, Hawazin and Thaqif tribes joined forces and advanced to attack the Muslims. The Holy Prophet met them at Hunain about 15 miles to the south-west of Mecca. He was accompanied by 12.000 men, among were 2.000 new converts who had joined the Muslim army at Mecca. …” 
Maulana Muhammad Ali:
“25a. With the declaration of immunity, there would naturally be an apprehension in the minds of the Muslims that the struggle would grow harder. Hence they are given an assurance of Divine help, amply justified by their previous experience. The battle of Ïunain, fought in the eighth year of the Hijrah in the valley of Junain, at about three miles from Makkah, differed from the other battles inasmuch as the Muslims here outnumbered the enemy, the tribes of Hawazin and Thaqif being about 4,000 strong, while the Muslims are said to have been as many as ten or even twelve thousand. The archers of the enemy were good marksmen, and had occupied strong positions in the mountain passes. The Muslim army, on the other hand, contained two thousand men of Makkah, some of them still adhering to idolatry. Unfortunately this was the advance party of the army, and, unable to face the archers, they retreated causing disorder to the whole army. The Prophet, however, led the assault, at first alone, in face of the archers, but was soon joined by others and a victory was obtained, as the next verse shows.” 
Don’t forget to follow Discover The Truth on Facebook and Twitter. PLEASE help spread the word by sharing our articles on your favourite social networks.
 The Message of The Quran translated and explained by Muhammad Asad page 372 – 376
 The Holy Qur’an – Arabic Text With English Translation & Short Commentary By Malik Ghulam Farid,
Page 382 – 383
 The Holy Quran Arabic Text with English Translation, Commentary and comprehensive Introduction [Year 2002 Edition] by Maulana Muhammad Ali, Page 400 – 403