Assuredly Allah did help you in many battle-fields and on the day of Hunain: Behold! your great numbers elated you, but they availed you naught: the land, for all that it is wide, did constrain you, and ye turned back in retreat.
In the year 630, just after Mecca surrendered to the Prophet, the nearby city of Ta’if organized an army to fight against the Muslims under the command of one Malik ibn ‘Awf an-Nadri. The two powerful tribes of Hawazin and Thaqif, who were the nucleus of the new enemy, were so confident of victory that they ordered all their women, children, camels and sheep to accompany them to the battlefield, thinking it would make them that much more earnest to win the fight. When the Prophet received news of the march of this new foe, he organized an army that numbered over twelve thousand men and set out from Mecca to meet this new enemy. (He asked the people of Mecca, his former foes, for the loan of weapons to equip his army. They were pleased that he asked, rather than took, and provided many weapons.) When the Muslims entered into a narrow valley named Hunayn, they were suddenly ambushed by the enemy – almost 20,000 strong – with a rain of arrows followed by an infantry charge, and the startled Muslims retreated in utter confusion. The Prophet and a few faithful companions not only stood their ground, however, but they continued to advance, and even Abu Sufyan, the recent convert, stood by the Prophet and helped defend him from the rushing assault of the enemy. (He later remarked that he would rather be ruled by a Qurayshi man than by a man of Ta’if!) The Prophet called for the Muslims to return and asked his uncle ‘Abbas to shout loudly to them. ‘Abbas cried out, “Companions of the Tree (from the Pledge of Ridwan), Companions of the Chapter of the Calf!” (This was a reference to chapter two of the Qur’an and it’s special place in the hearts of many.) Feeling ashamed at their cowardice, the Muslims returned and drove the forces of Ta’if back. Even some embittered Meccans who had come, secretly desiring to kill the Prophet in the confusion, found faith in God and instead helped the Prophet! Soon the pagans were on the run. They abandoned their women, children and goods in their camp and ran all the way back to the secure walls of their city. The Muslims took some 6,000 men, women and children captive and then laid siege to the city. The companions asked the Prophet to pray for the ruin of Ta’if, but the Prophet instead prayed for their conversion. Siege engines and catapults were soon brought by the recently converted Muslim tribe of Banu Daws from the south, but after a little less than a month, the Prophet lifted the siege, realizing that a sacred truce month had just arrived. However, he vowed to the beleaguered men of Ta’if that he would return with a new force the following year unless they capitulated. Some days passed, and a delegation of men from Ta’if arrived at the Prophet’s camp even before he returned to Mecca. They made offers of peace and then declared their conversion to Islam. They begged for the return of their families and goods. An-Nadri even sent word that both he and his nobles had converted. The Prophet asked the delegation to choose what they wanted returned: their captured men, women and children or their captured goods. They chose their people, and, after calling upon his men to consider freeing the captured people as a gesture of goodwill towards their new brothers-in-faith, the Prophet succeeded in getting the 6,000 captives freed. He also gave a hundred camels to an-Nadri and confirmed him as chief of the city of Ta’if. An-Nadri, who was surprised by the Prophet’s generosity, then composed a poem to praise the Prophet and his graciousness. (At-Tabari)
Emerick, Yahiya. The Meaning of the Holy Qur’an in Today’s English (p. 829). Unknown. Kindle Edition.