The Life of the Prophet Muhammad (pbuh)

Battle of Khandaq / Ahzab (5 AH)

Battles and military campaigns Core 3 min read

Overview

Battle of Khandaq (Trench) / Battle of Ahzab (Confederates) — a siege battle in which the Muslims used an innovative defensive strategy to repel a massive coalition army.
DateShawwal–Dhul Qa'dah, 5 AH (February–March 627 CE)
LocationNorth side of Madinah
Muslim force~3,000 men
Coalition (Ahzab) force~10,000 — Quraysh + Banu Nadir + Ghatafan + other tribes
Duration~15–27 days (siege, not open battle)
OutcomeMuslim victory; coalition withdrew without breakthrough

Background and causes

The Banu Nadir, a Jewish tribe previously expelled from Madinah for treaty violations, travelled to Makkah and other tribes to organise a massive coalition (the Ahzab — "Confederates") with the sole aim of destroying the Muslim community once and for all. This was the largest threat Madinah had ever faced.

Salman al-Farsi's plan — the trench

Salman al-Farsi (RA), a Persian Companion, advised digging a deep trench (khandaq) along the open northern approach to Madinah — the only side not naturally protected by mountains or buildings. This defensive tactic was unknown to the Arabs, who were accustomed to open field battles.
  • The trench was approximately 5.5 km long, 4–9 m wide, and 3 m deep.
  • All 3,000 Muslims — including the Prophet ﷺ himself — participated in the digging.
  • It was completed in approximately 6 days of intensive work.

Key events of the siege

  1. The trench held: The coalition cavalry repeatedly tried to cross but could not. This was completely unexpected — Arab horses could not jump the trench under fire.
  2. Amr ibn Abd Wudd — a legendary Quraysh warrior — managed to cross a narrow section with a small group. Ali ibn Abi Talib (RA) challenged and killed him in single combat, ending the only serious breach attempt.
  3. Banu Qurayza breach treaty: This Jewish tribe within Madinah secretly agreed to assist the coalition — creating the alarming prospect of attack from inside and outside simultaneously. The Prophet ﷺ sent negotiators, and the situation was tense but did not fully materialise.
  4. Nuaym ibn Masud's mission: This man secretly converted to Islam and, with the Prophet's ﷺ permission, spread distrust between the Quraysh, Banu Nadir and Banu Qurayza by carrying contradictory messages to each. This shattered the coalition's unity.
  5. Divine aid — wind and cold: Allah sent a fierce, bitterly cold wind that overturned the coalition's cooking pots and tents (Surah Al-Ahzab 33:9). Demoralised and unable to coordinate, Abu Sufyan ordered a withdrawal.

Outcome and aftermath

  • The coalition withdrew without having crossed the trench; Madinah was never breached.
  • No significant open battle took place — the victory was strategic and psychological.
  • After the siege, the Prophet ﷺ dealt with Banu Qurayza for their treaty violation.
  • Quraysh power broken: They would never again mount a unified offensive against Madinah.
Surah Al-Ahzab (33:9)
"O you who have believed, remember the favour of Allah upon you when armies came to [attack] you and We sent upon them a wind and armies [of angels] you did not see."
This verse confirms divine intervention as the ultimate cause of the Muslim victory.

Significance

  • Strategic genius: The trench strategy demonstrated that wisdom and innovation can overcome physical disadvantage — a key Islamic principle.
  • Unity of the Ummah: The entire community — regardless of rank — worked side by side, including the Prophet ﷺ. This demonstrated Islamic equality and solidarity.
  • Last Quraysh offensive: The Prophet ﷺ reportedly said after Khandaq: "From now on, we will attack them; they will not attack us." The initiative had shifted to the Muslims.
  • Path to the Treaty of Hudaybiyyah and Conquest of Makkah: Khandaq's outcome paved the way for the Muslims' eventual return to Makkah.
The examiner often asks: "How important was Salman al-Farsi's contribution?" The answer must credit his specific idea (trench), explain why it worked (unknown to Arabs, cavalry could not cross), and then assess: was it the most important factor, or was divine intervention (the wind) more decisive? Argue your position with evidence.