The Battle of Khandaq (al-Ahzab)

The Trench / al-Ahzab (5 AH); ~10,000 Confederates routed by wind & wit.

The great siege of Madinah in which the Prophet ﷺ and ~3,000 Muslims defended the city behind a trench (khandaq) against the largest coalition Arabia had ever seen — the ~10,000-strong Confederates (al-ahzab): Quraysh, Ghatafan, and allied tribes, incited and financed by the exiled Banu Nadir at Khaybar. After roughly a month of siege the alliance collapsed — scattered by internal distrust and a bitter wind — with almost no fighting. “Khandaq” means the trench; “al-Ahzab” means the confederate parties. It marks the turning point of the Seerah: from this point the Muslims went on the offensive.

When it happened (the dating dispute)

A genuinely contested date. Imam al-Bukhari, al-Zuhri, al-Nawawi, and Ibn Hazm placed it in Shawwal 4 AH, on the authority of Ibn Umar (Bukhari): “On the Day of Uhud I was 14 and was rejected; on the Day of Khandaq I was 15 and was let through.” Since Uhud is agreed to be 3 AH, this implies 4 AH — Ibn Hazm said “there can be no doubt” of it. But the seerah specialists — Ibn Ishaq, Ibn Hisham, Ibn al-Qayyim, al-Tabari, al-Samhudi — hold Shawwal 5 AH (al-Waqidi and Ibn Sa’d: Dhu al-Qa’dah 5 AH), reasoning that 4 AH already held the Badr al-Akhira rendezvous, and that Sa’d ibn Mu’adh — who died right after Khandaq — died in 5 AH. Al-Bayhaqi reconciled Ibn Umar’s report (perhaps he had just turned 14 at Uhud and was nearly 16 at Khandaq; ages were loosely tracked). Yasir Qadhi resolves to Shawwal 5 AH.

Background: why the Confederates came

The instigators were the Banu Nadir, expelled from Madinah (for plotting to kill the Prophet ﷺ) and resettled at Khaybar, hungry to reclaim their date-lands. Lacking manpower, a delegation of their leaders — Sallam ibn Abi al-Huqayq and Huyayy ibn Akhtab — went to Quraysh in Makkah, offering wealth and food (Khaybar’s dates) in exchange for a joint assault. When Quraysh asked whether Jewish or Muslim religion was “more guided,” the Banu Nadir flattered the pagans that they were closer to the truth — a lie Allah exposed in Q 4:51. The Nadir then hired Ghatafan (the largest northern tribe) with half of Khaybar’s produce for a year, and Quraysh recruited smaller trade-route tribes (Banu Asad, Sulaym, Murrah, Fizara, Ashja’, Kinana). For the first time all Arabia lined up under two banners — Islam and kufr.

The Muslims’ response (Shura (Consultation) and the trench)

News of massed armies could not be hidden. The Prophet ﷺ convened the sahaba, as at Badr and Uhud. With little to debate against 10,000 men, Salman al-Farisi — newly freed and in his first battle — proposed the Persian tactic of digging a trench. The Prophet ﷺ accepted it; per Ibn Sa’d he drew the line of the trench himself. Only the northern approach needed digging (~2 km): the harra lava-fields shielded east and west, and dense date-groves the south. He also sent the women and children to al-Fari’, the fortress of the Banu Harithah, fearing the possible treachery of the still-resident Banu Qurayza. The dig took between 6 days (Ibn Sa’d) and 2 weeks — an extraordinary effort with ~2,500 men, no machines, and no slaves. The Prophet ﷺ dug alongside them, chest covered in dust (al-Bara’), chanting “…make our feet firm when the enemies come to us… we refuse, we refuse (abayna, abayna).”

Women and children at al-Fari’; Safiyyah’s kill

Only one able man, the poet Hassan ibn Thabit (openly known to be jaban, unable to bear a sword), was sent with them. A week in, Banu Qurayza scouts probed the fortress at night. When Hassan could not act, Safiyyah bint Abd al-Muttalib (the Prophet’s ﷺ aunt) took a dagger, climbed out, killed the scout and threw down his head — the first woman in Islam to kill an enemy combatant (Musnad Ahmad, via Abdullah ibn al-Zubayr, then a boy of 4–5 in the fortress).

The siege and its hardships

Leaders of the Confederates

The treachery of Banu Qurayza — “from above you and below you”

The Nadir emissary Huyayy ibn Akhtab (Safiyyah’s father) slipped into Madinah and, after a night of relentless persuasion and emotional blackmail, induced Ka’b ibn Asad al-Qurazi — chieftain of Banu Qurayza — to tear up their treaty and join the siege, though Ka’b warned “you are a cloud that brings only thunder and lightning.” Zubayr ibn al-Awwam first detected it — earning the words “every prophet has a disciple, and mine is Zubayr.” Four Ansari leaders (incl. Sa’d ibn Mu’adh and Sa’d ibn Ubadah) confirmed it; the Prophet ﷺ received the news with the tawriya “Allahu akbar, good news!” to prevent panic. With ~2,000 enemies now inside and 10,000 outside, and the women exposed at al-Fari’, the sahaba called it the worst night of their lives — the state Allah describes: “when they came at you from above you and from below you… hearts reached the throats” (Q 33:10–11).

The munafiqun

The hypocrites made it worse, begging leave “to protect our families,” and mocking: “Muhammad promised us the treasures of Kisra and Qaisar — and now one of us is too scared to go relieve himself!” Within a decade the Muslims would indeed eat from the plates of Chosroes and Caesar. Notably, the munafiqun never called him “Rasulullah.”

The skirmishes and Amr ibn Abd Wud

Facing the trench, the Confederates could not charge en masse and settled into a siege. A few riders leapt the trench where it was unguarded:

The death-wound of Sa’d ibn Mu’adh

The chieftain of the Aws, Sa’d ibn Mu’adh, went to the front in a sparse breastplate. An arrow from Hibban ibn al-Ariqah struck him at the clavicle by his neck. He prayed that if any war with Quraysh remained he be spared to fight, but if not, to be taken as a martyr — “but let my eyes be comforted by what happens to the Banu Qurayza.” His du’a was answered: he lived just long enough to render the judgment on Banu Qurayza, then died. At his death the Prophet ﷺ said the angels prayed over him and the Throne of Allah shook (Bukhari, Muslim).

Missing Salat al-Asr

On one day the fighting was so pressing that the Muslims — and the Prophet ﷺ — missed Salat al-Asr (al-wusta, the middle prayer), praying it after sunset. Bukhari: “They have kept us from Salat al-Wusta — may Allah fill their houses and graves with fire.” His anger was for the missed prayer, not for the threat to his life. This is one of only two times the Prophet ﷺ unintentionally missed a prayer. (On the relation to Salat al-Khawf, the majority hold it had been revealed but was genuinely forgotten in the crisis.)

Nuaym ibn Mas’ud and the Sabbath ruse

Around day 20, Nuaym ibn Mas’ud of Ghatafan — a secret convert trusted by both Abu Sufyan and Banu Qurayza — offered his service. Given leave (“war is khid’a” — ruse, not khiyana/treachery), he sowed a three-way distrust: he told Banu Qurayza to demand Qurayshi hostages before fighting; told Quraysh that Qurayza wanted their nobles only to hand them to Muhammad; and told his own Ghatafan to refuse. When Qurayza duly demanded 70 hostages, Abu Sufyan balked. Then, because the next day was Saturday (the Sabbath), Qurayza asked to delay — which the Sabbath-ignorant Quraysh read as pure betrayal (“what is Saturday but a day between Sunday and Friday?”). The alliance fractured.

Hudhayfah’s night reconnaissance and the wind (Saba)

On the worst, coldest, wind-lashed night, the Prophet ﷺ asked three times for a volunteer to spy on Quraysh — none rose from exhaustion — until he named Hudhayfah (unknown to Quraysh, so ideal). After the Prophet’s ﷺ du’a of protection, Hudhayfah slipped into Abu Sufyan’s camp, twice deflecting suspicion by seizing the men beside him and demanding “Who are you?” He heard Abu Sufyan announce the retreat — “our animals have perished, the wind gives us no fire or pot, and the Banu Qurayza have betrayed us” — and rode off. Al-Bayhaqi records 20 turbaned horsemen (angels) met Hudhayfah: “tell your companion we have done the fighting for him.” The wind was al-Saba (a wind of mercy from the east), not the destroying al-Dabur that ruined Ad — sent so, Yasir Qadhi notes, because the Prophet ﷺ still hoped for these people’s guidance. Allah’s help is described in Q 33:9 (“We sent against them a wind and forces you could not see”) and Q 33:25 (“Allah spared the believers from fighting”).

Participants

Outcome & significance

The Confederates dispersed having gained nothing — a humiliation unmatched in Arabian history. Casualties were the fewest of any major ghazwa: ~6–7 Muslims (mostly by arrows) and ~3–4 pagans. The Prophet ﷺ declared (Musnad Ahmad): “Now we will march on them, and they will not march on us” — the strategic tide had turned to Islam. Allah’s du’a-answering victory came through Muslim iman, Nuaym’s ruse, Qurayshi ignorance of the Sabbath, the exhausting siege, and the armies of wind and angels. Its lessons and the confederate collapse fill much of Surah al-Ahzab (Q 33).

Immediately after the siege lifted, the reckoning of Banu Qurayza followed — see the Judgment of Banu Qurayza for Sa’d ibn Mu’adh’s verdict and the treatment of the tribe (EP 061–062).

Lessons

Reliability (schema §5)

As with Uhud, the sources preserve episodes, not a running chronology (the siege lasted ~40 days: ~1 week digging + ~30 days siege); the ordering here is one reasoned reconstruction. Core reports — Ibn Umar (dating), the food miracles, the missed Asr, Sa’d’s wound and the shaking Throne, Hudhayfah’s night, and Q 33:9–11, 25 — are in Bukhari/Muslim and the Quran. The Huyayy–Ka’b dialogue is Ibn Ishaq without chain; Nuaym’s first-person account is uniquely in al-Waqidi; the angel-horsemen detail is via al-Bayhaqi. Trench dimensions are modern estimation.

Cross-references

Muhammad ﷺ · Madinah (Yathrib) · Mecca · Quraysh · Abu Sufyan ibn Harb (ra) · Salman al-Farisi (ra) · Ali ibn Abi Talib (ra) · Zubayr ibn al-Awwam (ra) · Sa'd ibn Mu'adh (ra) · Hudhayfah ibn al-Yaman (ra) · Nuaym ibn Mas'ud (ra) · Amr ibn Abd Wud · Safiyyah bint Abd al-Muttalib (rha) · Hassan ibn Thabit (ra) · Ammar ibn Yasir & the Family of Yasir (ra) · Sa'd ibn Abi Waqqas (ra) · Zayd ibn Harithah (ra) · Khalid ibn al-Walid (ra) · Ikrimah ibn Abi Jahl (ra) · Huyayy ibn Akhtab · The Expulsion of Banu Nadir · Khaybar · Expeditions Between Uhud and Khandaq (Second Badr & Dhat al-Riqa) · Barakah (Divine Blessing) · Salat al-Khawf (The Prayer of Fear) · Nifaq (Hypocrisy) · Shura (Consultation) · Tawakkul (Reliance on Allah) · The Battle of Uhud · The Battle of Badr · Seerah Timeline

Sources