in shawwal of the fifth year, according to the more correct of two statements, the battle of al-ahzaab,[1]also known as the battle of al-khandaq,[2]took place. the background of this battle was that the prophet peace be upon him had evicted the jews of bani an-nadheer from madinah the previous year due to their attempt to assassinate him. so, a group of their nobles went to makkah and incited the quraysh to fight the messenger of allahpeace be upon him, promising to assist them against him. the quraysh responded positively and agreed to fight him. then they went on to bani ghatafan and bani sulaym, inciting them also, and they agreed as well. after that they went around to all the arab tribes, calling on them to fight against the messenger of allahpeace be upon him.
the quraysh set out with four thousand soldiers led by abu sufyan. they took with them three hundred horses and 1500 camels. seven hundred from bani sulaym joined them at marr ath-thahran, as did one thousand from bani asad and fazarah, four hundred from asja` and four hundred from bani murrah. the total from the tribes that gathered for the battle of al-khandaq was 10,000. these were the confederates.
when the messenger of allah peace be upon him learned of their advance from makkah, he peace be upon him consulted the people. salman al-farisi suggested digging a trench to prevent the enemy from entering madinah, and the messenger of allah peace be upon him ordered it to be done. the muslims began excavation, and the messenger himself participated in it. the trench was dug in front of mount sal`, and the muslims kept their backs to the mountain with the trench between them and the unbelievers. they finished the trench within six days, so the prophet peace be upon him and those with him, whose number was three thousand, were fortified. he ordered that the women and children be kept in a fortress inside madinah.
al-baraa' ibn `azibmamay allah be pleased with him allah be pleased with himreported: "we were digging the trench when we came upon a huge hard rock which could not be broken by the pickaxe. they complained of it to the prophetpeace be upon him. when he saw it he threw aside his cloak, took the axe and said, "bismillah." he peace be upon him struck it once and one third of it broke. he peace be upon him said,
"allahu akbar! i have been given the keys of syria, and by allah, i can see its red palaces now."
then he peace be upon him struck it a second time and another third broke. he peace be upon him said,
"allahu akbar! i have been given the keys of persia, and by allah, i can see the white palace of al-madaa'in." then he struck it a third time and the rest of the stone broke. he peace be upon him said, "allahu akbar! i have been given the keys of yemen, and by allah, i can see the gates of sanaa from my place now."
huyayy ibn akhtabwent to bani quraydhah, who had a pact with the messenger of allahpeace be upon him, and he kept on pressing them until they broke the agreement and joined with the polytheists in the war against allah's messengerpeace be upon him. difficulties increased for the muslims and hypocrisy appeared. some from bani harithah asked permission of the prophet peace be upon him to return to madinah, saying that their homes were unprotected. but almighty allah revealed:
and they were not unprotected; they only wished toflee. (33:13)
bani salamahalso thought of giving up, but almighty allah kept the two parties steadfast.
the polytheists continued the siege of allah's messengerpeace be upon him for a month but no direct battle occurred due to the trench by which almighty allah prevented them from reaching the muslims. the prophet's peace be upon him biographers related:
fear became intense on a day of "al-khandaq"; people became discouraged and feared for their children and properties. the polytheists were seeking a shallow part of the trench through which their horses could cross and a few of them managed to do so. among them was `amr ibn wudd, who called for a duel although he was a man of seventy years. `ali may allah be pleased with him accepted his challenge and killed him.
by morning, a large company had gathered among whom was khalid ibn al-waleedmay allah be pleased with him. skirmishes and exchanges of arrows continued until night and the messenger of allah peace be upon him was unable to pray `asr that day until after sunset. he peace be upon him said,
"they kept us from the middle prayer; may allah fill their houses and graves with fire."
then almighty allah brought about a matter which caused a setback to the enemy and broke their unity. na`eem ibn mas`udmamay allah be pleased with him allah be pleased with himhad embraced islam, something unknown to the polytheists and jews. he went back and forth between the quraysh and bani quraydhah deceiving them with false information and causing mistrust between them. then, almighty allah sent a violent wind, and abu sufyanmamay allah be pleased with him allah be pleased with himsaid to his companions, "you are not in a secure settlement; the camels and horses have expired, bani quraydhah have left us, and we have been afflicted by the wind as you see. so depart, for i am departing." three of the polytheists had been killed and six from among the muslims.[3]
[1]i.e., the confederate parties.
[3]see al-wafa bi-ahwaalal-mustafa, pp.713-714, and zad al-ma`ad, 3/269-275.