Of all the trials that struck the early Islamic community, Al-Khandaq was the most existential. Not because the fighting was the bloodiest, but because the coalition that had formed against Madinah was large enough to destroy the city completely. Ten thousand men stood at its gates. From within, the hypocrites threatened, and there was a Jewish tribe on the verge of breaking the treaty. The Prophet ﷺ and his Companions ﵃ dug a trench in bitter cold while hunger weakened them. And yet they survived. Not through military superiority, but through patience, unity and the help of Allah ﷻ.
Loading battle...
The Cause
After the expulsion of the Banu Nadir in the fourth year after the Hijra, their leader Huyayy ibn Akhtab travelled to Makkah. He was a man of great rhetorical talent and political acumen, and he used both to convince the Quraysh of something they already wished to hear: that the moment had come to destroy Madinah for good.
Allah ﷻ revealed concerning this statement:
أَلَمۡ تَرَ إِلَى ٱلَّذِينَ أُوتُواْ نَصِيبٗا مِّنَ ٱلۡكِتَٰبِ يُؤۡمِنُونَ بِٱلۡجِبۡتِ وَٱلطَّٰغُوتِ وَيَقُولُونَ لِلَّذِينَ كَفَرُواْ هَٰٓؤُلَآءِ أَهۡدَىٰ مِنَ ٱلَّذِينَ ءَامَنُواْ سَبِيلٗا
Have you not seen those who were given a portion of the Book? They believe in idols and false gods, and say of those who disbelieve: “These are more rightly guided than those who believe.”
Surah Al-Nisa: 51
After the Quraysh, Huyayy travelled to the tribe of Ghatafan in Najd. He offered them half of the annual date harvest of Khaybar in exchange for their participation. They agreed. He then visited tribe after tribe. All were won over, whether by promises of plunder, by family ties to the Quraysh, or by their own enmity toward the Prophet ﷺ.
The Tribes of the Coalition
To understand what the Ahzab were, one must understand who took part in them and why. It was no random gathering of tribes. It was a carefully assembled network of interests, ties and grievances, each with its own motive for joining.
The Quraysh
The Quraysh of Makkah formed the core of the coalition. They had the most to lose and the strongest motivation. Badr had cost them seventy of their leaders. Uhud had partly restored their honour but had not destroyed Madinah. The trade routes to Syria were under constant pressure from Muslim expeditions. And Abu Sufyan, who had based his leadership on the promise of vengeance, had tied his credibility to a decisive victory.
They contributed four thousand infantry, three hundred cavalry and fifteen hundred camels to the coalition. Abu Sufyan personally took the supreme command. Khalid ibn al-Walid, the hero of Uhud, commanded the cavalry.
The Ghatafan
The Ghatafan were the largest and most powerful tribe of Najd. They consisted of several sub-branches, including the Banu Fazara and the Banu Murra, and could mobilise thousands of warriors. Huyayy offered their leader Uyaynah ibn Hisn al-Fazari half of the date harvest of Khaybar. Khaybar was the wealthiest agricultural region in northern Arabia, known for its palm groves and fertile soil. The promise of an annual income from Khaybar was, for a nomadic tribe like the Ghatafan, an attractive prospect.
Uyaynah ibn Hisn led the Ghatafan to Madinah with four thousand men, the largest contribution to the coalition after the Quraysh themselves.
The Banu Sulaym
The Banu Sulaym had a long history of enmity with the Muslims. They had earlier been involved in the massacre of Bi’r Ma’unah, where seventy Muslim scholars had been slaughtered. They had also taken part in the expedition of Uhud on the side of the Quraysh. For them, joining the coalition was not a difficult decision. They hated the Prophet ﷺ openly and saw in the coalition a chance to finish what had been begun at Uhud.
They contributed seven hundred warriors to the coalition.
The Banu Asad
The Banu Asad likewise had direct grievances. They were a tribe of significance in central Arabia and had earlier endured expeditions of the Prophet ﷺ that had threatened their sphere of influence. Huyayy approached their leader Tulayha ibn Khuwaylid, who would later himself become a false prophet but at this moment was still a powerful tribal chief. They joined out of a combination of tribal pride and calculation.
The Banu Murra
The Banu Murra were a sub-branch of the Ghatafan and were approached separately by Huyayy because of their geographical position. They controlled routes in northern Arabia that were strategically important for the supply of so large an army. Their leader al-Harith ibn Awf joined the coalition but would, during the siege, decide to withdraw his men, a decision that would later become a matter of dispute.
The Banu Ashja
The Banu Ashja were a smaller tribe but of significance because of their location and their family ties to the Ghatafan. They contributed four hundred men. Their tribal leader Mas’ud ibn Rukhaylah led them to Madinah. Notably, Nu’aym ibn Mas’ud ﵁, the man who would later, on behalf of the Prophet ﷺ, undermine the coalition from within, belonged to the Banu Ashja. He had travelled with his tribe as part of the coalition before secretly accepting Islam.
The Banu Kinanah and the Ahabish
The Quraysh had traditional alliances with the Banu Kinanah, a large tribe that dominated the area around Makkah, and with the Ahabish, a coalition of smaller tribes that supported the Quraysh during the sacred month. They were not so much persuaded as called up on the basis of existing obligations. It was a matter of tribal honour: when the Quraysh called, their allies came.
The Distribution of the Army
When the coalition marched on Madinah, the various contingents proceeded along separate routes to prevent confusion and conflicts along the way. Abu Sufyan led the Quraysh and their direct allies from the west along the usual coastal route. Uyaynah ibn Hisn led the Ghatafan and the tribes of Najd from the east along the Najd route.
The two armies were to meet only before the walls of Madinah. It was a logistical achievement of the highest order and proof of how seriously the coalition took its task. They had not come for a quick raid. They had come to put an end to Madinah.
The result was a coalition of a size the Arabian Peninsula had never before seen in its struggle against the Muslims. The Ahzab, the Confederate Tribes, marched on Madinah with an estimated ten thousand men.
The Preparation of the Muslims
The Prophet ﷺ received reports in good time of the approaching coalition. He called his Companions ﵃ together for a shura. The situation was clear: seven hundred to three thousand men against ten thousand. Open battle was no option. To defend Madinah from its buildings was also no option, for the city had no walls capable of withstanding an army of this size.
It was Salman al-Farisi ﵁ who put forward the idea that would change everything.
The idea was unknown in Arabia. The Arab tradition of warfare knew tribal skirmishes, ambushes and caravan raids, but no fortification or defensive works on this scale. The Companions ﵃ at once recognised the genius of the proposal. The Prophet ﷺ agreed and the digging began.
The trench was dug on the northern side of Madinah, the only side open and accessible to a large attacking army. The other sides of Madinah were protected by buildings, palm groves and rocky terrain unsuited to cavalry.
The Prophet ﷺ divided the Companions ﵃ into groups and assigned each a section of the trench. He ﷺ dug himself. Reports describe how he ﷺ personally cleared away the earth, carried stones and encouraged the men as they worked. When his Companions ﵃ saw him in this state, they doubled their effort.
The conditions were severe. It was winter. The ground was hard. The food supplies were scarce, and hunger was felt by all.
Jabir ibn Abdullah ﵁: (Saw that the Prophet ﷺ had bound a stone over his belly because of hunger) O Messenger of Allah, I have something to eat at home. May I invite you?
Prophet ﷺ: And how much is there?
Jabir ibn Abdullah ﵁: A small portion of goat and a measure of barley.
Prophet ﷺ: That is good and abundant. But tell your wife not to take the pot off the fire and not to bake the bread until I come.
(The Prophet ﷺ calls all those present to come along)
Jabir ibn Abdullah ﵁: (Whispers to his wife) The Prophet ﷺ is coming, and he is bringing everyone with him.
Wife of Jabir ﵂: Did he ask you how much there was?
Jabir ibn Abdullah ﵁: Yes.
Wife of Jabir ﵂: Then Allah and His Messenger know best.
(The Prophet ﷺ arrives, prays over the food and breaks the bread. The food kept multiplying until everyone present, more than a thousand men, had eaten, and the pot was still full.)
During the digging, a wonder occurred that the Companions ﵃ would remember all their lives. They came upon a large, hard rock that no tool seemed able to break.
Companions ﵃: (Report it to the Prophet ﷺ)
Prophet ﷺ: (Descends into the trench, takes the pickaxe and strikes the rock)
(At the first blow a flash of light flies out)
Prophet ﷺ: Allahu Akbar! I have been given the keys of Syria. By Allah, I see its red palaces now.
(At the second blow another flash flies out)
Prophet ﷺ: Allahu Akbar! I have been given the keys of Persia. By Allah, I see the white palace of Madain now.
(At the third blow the rock breaks and the last flash flies out)
Prophet ﷺ: Allahu Akbar! I have been given the keys of Yemen. By Allah, I see the gates of Sana from where I stand.
The Companions ﵃ who were present passed this on with awe. They had seen a man who, in bitter cold and with a stone bound over his belly because of hunger, struck rock and proclaimed the rise of an empire that, at that moment, could only seem a dream.
The trench was dug in six days, an achievement that, given the circumstances, was extraordinary.
The Coalition Arrives
Abu Sufyan ibn Harb led the combined army of the Quraysh and their allies from the west. The Ghatafan and the other tribes of Najd approached from the east. When they reached the trench, they were stunned.
Abu Sufyan and his leaders: (On seeing the trench for the first time) This stratagem is not Arab. A foreigner has surely devised this.
The trench was wide enough to stop cavalry and deep enough to keep infantry from crossing easily. The coalition pitched its camp on the far side and began attempts to cross the trench at vulnerable points. Day after day, these attempts were beaten back by the Muslims who guarded the bank.
The Prophet ﷺ positioned his army with Mount Sala at his back. The women and children were placed in the fortresses of the Banu Harithah. The Companions ﵃ stood watch day and night along the trench, relieving one another and sleeping in short stretches.
The Treachery of Banu Qurayza
After two weeks of siege, a development took place that made the situation of the Muslims critical at a stroke. Huyayy ibn Akhtab, who had come with the coalition, approached the leader of the Banu Qurayza, Ka’b ibn Asad. The Banu Qurayza was the third and last Jewish tribe in Madinah. Until then they had honoured the treaty with the Prophet ﷺ.
Ka’b ibn Asad: (Refuses to open the door) Woe to you, Huyayy. You bring misfortune. I have known a man who keeps his word and is faithful to his covenant.
Huyayy ibn Akhtab: Woe to you, Ka’b, open up for me. I bring you honour and a sea of wealth.
Ka’b ibn Asad: (Eventually opens the door)
Huyayy ibn Akhtab: Ka’b, I bring you the might of the Quraysh with their leaders and nobles, and the Ghatafan with their leaders. They have promised me not to leave until they have destroyed Muhammad and his people.
Ka’b ibn Asad: By Allah, you bring me only shame and humiliation. An empty cloud that promises rain but gives nothing. Leave me in peace, O Huyayy.
Huyayy ibn Akhtab: No, by Allah. Open up for me.
(After long insistence, Ka’b ibn Asad gave way and broke the treaty with the Prophet ﷺ)
The news reached the Prophet ﷺ swiftly. The situation was now extremely grave: ten thousand men at the front, a treacherous tribe at the rear. The women and children in the Harithah fortresses were suddenly exposed.
Prophet ﷺ: (After confirmation of the betrayal) Allahu Akbar. Believers, rejoice in the victory of Allah.
He sent Sa’d ibn Mu’adh ﵁ and Sa’d ibn Ubadah ﵁ with several others to verify the news, and spoke to them apart before they set out.
Prophet ﷺ: If you find that it is true, use a code so that the people do not hear. If it is false, proclaim it loudly.
Sa’d ibn Mu’adh ﵁ and Sa’d ibn Ubadah ﵁: (Return) Adhal wa Qarah.
It was the code. The betrayal was confirmed.
The Pressure Mounts
The siege went on. For nearly a month the Muslims stood day and night at the trench, exposed to the cold, to hunger and to the constant pressure of an enemy that far outnumbered them. The strain began to take its toll.
A group of warriors from the coalition, among them the famed horseman Amr ibn Abd Wudd, found a narrow and unguarded point in the trench and managed to cross over with several riders. Amr ibn Abd Wudd was reckoned in the Arab tradition to be the equal of a thousand warriors.
Amr ibn Abd Wudd: (Cries out to the Muslims) Who will face me?
Ali ibn Abi Talib ﵁: (Stands up) I will.
Prophet ﷺ: This is Amr. Sit down.
Amr ibn Abd Wudd: (Calls out again)
Ali ibn Abi Talib ﵁: (Stands up again) I, O Messenger of Allah.
Prophet ﷺ: This is Amr ibn Abd Wudd.
Ali ibn Abi Talib ﵁: Even if he is Amr ibn Abd Wudd.
(The Prophet ﷺ gives him permission and binds his turban around his head)
Prophet ﷺ: O Allah, protect him.
Ali ibn Abi Talib ﵁: (Goes out to fight Amr)
Amr ibn Abd Wudd: Who are you?
Ali ibn Abi Talib ﵁: I am Ali, the son of Abu Talib.
Amr ibn Abd Wudd: Your father was a noble man. I do not wish to spill your blood.
Ali ibn Abi Talib ﵁: But I do wish to spill yours.
(Amr ibn Abd Wudd dismounted and they fought. Ali ﵁ killed him.)
The rest of the riders who had crossed the trench fled back. The breach was closed.
Nu’aym ibn Mas’ud: The Stratagem
While the siege continued, a man appeared before the Prophet ﷺ whom no one expected: Nu’aym ibn Mas’ud of the tribe of Ghatafan. He had secretly accepted Islam without his tribe’s knowledge.
Nu’aym ibn Mas’ud ﵁: O Messenger of Allah, I have accepted Islam, but my people do not know. Command me as you wish.
Prophet ﷺ: You are but one man among us. Sow division among them if you can, for war is stratagem.
Nu’aym ibn Mas’ud ﵁ went to the Banu Qurayza and addressed them as a friend, as one who sought their welfare.
Nu’aym ibn Mas’ud ﵁: (To the Banu Qurayza) You know what my bond with you is. I want to tell you something in confidence.
Banu Qurayza: Speak.
Nu’aym ibn Mas’ud ﵁: The Quraysh and the Ghatafan are not in the same position as you. This land is your land, here are your possessions, your women and your children. You cannot go elsewhere. The Quraysh and the Ghatafan have come to fight. If they see a chance for plunder they will take it, and if they falter they will withdraw to their own land and leave you alone with Muhammad. And you cannot stand against him. Therefore demand hostages from the nobles of the Quraysh and the Ghatafan before you cooperate with them.
Banu Qurayza: That is good advice.
Then he went to Abu Sufyan and the leaders of the Quraysh and told them that the Banu Qurayza regretted breaking the treaty and intended to ask for hostages from the Quraysh to hand over to Muhammad ﷺ as proof of their good will. He told the same story to the Ghatafan.
The result was precisely what the Prophet ﷺ had hoped for. When the Quraysh sent messengers to the Banu Qurayza requesting a joint attack, the Banu Qurayza answered that they first wanted hostages. The Quraysh refused, convinced that Nu’aym’s account was true. Mutual mistrust had been sown, and the coalition began to fall apart from within.
The Turning Point: Wind and Angels
The coalition had now camped outside Madinah for nearly a month without forcing any breakthrough. Supplies began to run out. Horses died or grew weak from lack of food. Morale fell. And then Allah ﷻ sent His help in a manner no man could have planned.
Hudhayfa ibn al-Yaman ﵁: (Narration) The Prophet ﷺ called me to him on a cold night. I was so cold and so hungry that I could hardly move. He ﷺ said to me: “Stand up, go to the camp of the coalition and bring me news. Do nothing until you are back with me.”
Hudhayfa ﵁: (Continues) I stood up and crept toward their camp. There I saw Abu Sufyan sitting by a fire warming his back. I took my arrow and bow and was about to kill him, but I remembered the words of the Prophet ﷺ: do nothing. I lowered my arrow.
Abu Sufyan: (Addresses his men) O Quraysh, know that your position is not tenable. Our horses and camels have died. The Banu Qurayza have failed us. We hear difficult things from them. The wind is hurting us. Go back, for I too am going back.
(Abu Sufyan stands up and walks to his camel to mount it. He forgets that the camel is still kneeling and tied.)
Abu Sufyan: (Cries out) Do not fall, do not fall! (Realises his mistake and unties the camel)
Allah ﷻ had sent an icy wind that lifted the tents of the coalition, overturned the cooking pots and drove off the animals. Together with the angels He sent to fill the hearts of the coalition with fear, it was enough. The coalition broke off the siege and withdrew.
Allah ﷻ says:
يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُواْ ٱذۡكُرُواْ نِعۡمَةَ ٱللَّهِ عَلَيۡكُمۡ إِذۡ جَآءَتۡكُمۡ جُنُودٞ فَأَرۡسَلۡنَا عَلَيۡهِمۡ رِيحٗا وَجُنُودٗا لَّمۡ تَرَوۡهَاۚ وَكَانَ ٱللَّهُ بِمَا تَعۡمَلُونَ بَصِيرًا
O you who believe, remember the favour of Allah upon you when armies came against you and We sent against them a wind and forces that you did not see. And Allah ever sees what you do.
Surah Al-Ahzab: 9
The Banu Qurayza
The day after the coalition had departed, while the Prophet ﷺ had just returned home and laid down his armour, Jibril ﵇ appeared to him.
Jibril ﵇: Have you laid down your weapons, O Messenger of Allah? By Allah, the angels have not yet laid down theirs. March to the Banu Qurayza, for Allah has sent me to them to shake them.
The Prophet ﷺ at once had the call go out:
Prophet ﷺ: No one is to perform the Asr prayer except at the Banu Qurayza.
The army marched to the fortresses of the Banu Qurayza. The Banu Qurayza fortified themselves. A siege of twenty-five days followed. In the end they surrendered and laid down as a condition that Sa’d ibn Mu’adh ﵁, the leader of the Aws with whom they had an alliance, should pronounce judgement over them.
Sa’d ibn Mu’adh ﵁ had been gravely wounded at Al-Khandaq by an arrow that had struck his artery. He was brought on a camel to the Banu Qurayza.
Aws ﵃: (Call out to him as he approaches) O Abu Amr, treat your allies well.
Sa’d ibn Mu’adh ﵁: (Remains silent and turns his face away)
Aws ﵃: (Continue to address him)
Sa’d ibn Mu’adh ﵁: It is time for Sa’d to pay no heed to any reproach in the cause of Allah.
(Turns to the Banu Qurayza)
Sa’d ibn Mu’adh ﵁: I judge that the men be killed, the women and children taken captive and the possessions distributed.
Prophet ﷺ: You have judged with the judgement of Allah from above the seven heavens.
Sa’d ibn Mu’adh ﵁ died shortly afterwards from his wound. The Prophet ﷺ said of him that the Throne of the Most Merciful had trembled at his death.
The Aftermath
Al-Khandaq was over. The coalition had fallen apart without delivering a decisive battle. The Banu Qurayza, the last Jewish tribe of Madinah, had been removed. The hypocrites, who during the siege had shown their true face by discouraging the men and abandoning the defence, had been thoroughly discredited. Allah ﷻ had named them by name in the Quran in the Surah revealed about Al-Khandaq.
Allah ﷻ says of those who had thought of fleeing:
وَإِذۡ يَقُولُ ٱلۡمُنَٰفِقُونَ وَٱلَّذِينَ فِي قُلُوبِهِم مَّرَضٌ مَّا وَعَدَنَا ٱللَّهُ وَرَسُولُهُۥٓ إِلَّا غُرُورٗا
And when the hypocrites and those in whose hearts is a disease said: “Allah and His Messenger have promised us nothing but delusion.”
Surah Al-Ahzab: 12
The strategic significance of Al-Khandaq was enormous. The Prophet ﷺ himself put it most concisely:
Prophet ﷺ: From now on we attack them; they no longer attack us. We march on them.
It was a turning point. Badr had established the Muslims. Uhud had tested them. Al-Khandaq had secured their survival. The coalition that had mobilised ten thousand men had returned empty-handed. No tribe in Arabia would attempt a second time to assemble such a coalition. The initiative in the Arab world had shifted decisively to the Islamic state in Madinah.
The next phase would no longer be defensive.
