ta’if campaign is in fact an extension of hunain ghazwah; that is because the majority of the defeated troops of hawazin and thaqif went into ta’if with the general commander — malik bin ‘awf an-nasri — and fortified themselves within it. so upon finishing with hunain invasion, he gathered the booty at al-ji‘ranah in the very month (i.e. shawwal) and in the eighth year a.h.
a vanguard battalion of a thousand men led by khalid bin al-waleed marched towards at-ta’if. whereas the messenger of allâh [pbuh] proceeded passing through nakhlah al-yamaniyah, qarn al-manazil and through laiyah. at laiyah there was a castle that belonged to malik bin ‘awf, so the messenger of allâh [pbuh] gave orders to have it destroyed. he resumed his march till he got to ta’if. there he dismounted, camped near its castle and laid siege to the castle inhabitants; but not for long.
how long the siege continued, is still a matter of disagreement. it however stands between 10-20 days. [sahih muslim, narrated by anas [aws]; fath al-bari 8/45]
a lot of arrow-shooting and rock-hurling occurred during the siege. for as soon as the muslims laid siege round the castle, its people started shooting arrows against them. the arrows were so intense and fierce that they looked as if they had been locusts on the move. a number of muslims were wounded and twelve were killed.
to be far from the arrow-range, the muslims had to ascend to a higher location and camped on — i.e. to what is now called at-ta’if mosque. the prophet [pbuh] set up a mangonel and shelled the castle. eventually a gap was made in the castle wall, through which a number of muslims managed to pass into the castle, sheltered by a wooden tank, with the purpose of setting fire into it. anyway, the enemy poured down molten hot iron on them. affected by this the muslims stepped out of the tank and were again exposed to arrow shooting and consequently some of them were killed.
to force the enemy to surrender, the prophet [pbuh] tended to a war policy of burning and cutting the enemy’s crops. his order was to cut their vineyards and burn them. seeing that the muslims started rapidly cutting and burning their vines, they implored the prophet [pbuh] to stop and have mercy on them for the sake of allâh and out of kinship motives. so the prophet agreed. when the caller of the messenger of allâh [pbuh] called out unto people saying "he whosoever descends and steps out of the castle is free." twenty-three men came out. [sahih al-bukhari 2/620] one of them was abu bakrah who tied himself to a wall and let himself down by means of a small wheel, that would normally be used for drawing up water from a well. the way he let himself down made the prophet nickname him "abu bakrah", i.e. the man with the wheel. the messenger of allâh صلى الله عليه و سلم set them all free and entrusted each one of them to a muslim to care about their living affairs, which was too hard for the castle folkspeople to bear.
seeing that the siege lasted too long and that the castle was immune and could stand any siege (for they had already stored a supply that suffices for over a year) and that the muslims were suffering — day by day — from arrow-shots and heated iron hooks, the messenger of allâh [pbuh] consulted nawfal bin mu‘âwiyah ad-daili about that. he said: "they are like a fox hiding inside its burrow. if you stoodfast at it you would catch it, but if you parted with it, no harm would afflict you." the messenger of allâh [pbuh] decided to lift the siege and depart. ‘umar bin al-khattab, who was ordered by the prophet to notify people, said to them "if allâh will, we are leaving the castle and going back tomorrow." as it was too hard for the muslims to go back and leave the castle unconquered they complained saying, "should we go away while the castle is still unopened?" his reply was: "then, start fighting in the morning." in the morning they fought and were wounded. so when he repeated this statement: "if allâh will, we are leaving the castle and going back tomorrow", they were pleased and carried out the order submissively and started moving, which made the messenger of allâh [pbuh] laugh.
as soon as they mounted and started moving the messenger [pbuh] said:
"say! here we are returning, repenting, worshipping (allâh) and to our lord we offer praise."
when the messenger of allâh was asked to invoke allâh against thaqif, he said:
"o allâh, guide thaqif and bring them to us as muslims."