The Battle of the Trench (al-Ahzab)

غزوة الأحزاب (الخندق)

c. February 627 CE · Shawwal 5 AH

Medina

In Shawwal 5 AH (February-March 627 CE), a confederate army of 10,000 Meccans and Bedouin allies besieged Medina; upon Salman al-Farisi (may God be pleased with him)'s advice the Muslims dug a protective trench on their northern boundary; the siege endured for nearly a month amidst cold, hunger, and the treachery of Banu Qurayza, until broken by Nu'aym ibn Mas'ud's stratagem and a violent night windstorm.

Depth

At a glance

Era
The Prophetic Era
Region
Arabia
Identifiers
Wikidata
Review
Draft Completeness 2/5 · Help complete it

In time

610620630640 c.
Pre-Islamic Arabia · The Prophetic Era · The Rashidun Caliphate

In space

Medina

Map: Natural Earth, public domain · places and route from the graph

BattlesWars and campaigns

Sides

Muslim Defenders of Medina

The early Muslim community · The Muhajirun · The Ansar

Commanders: Muhammad

Confederate Army (al-Ahzab)

Quraysh

Commanders: Abu Sufyan ibn Harb · Uyayna ibn Hisn al-Fazari

Reading levelRead it in the Kids' Wing

The Muslims dug a trench around Medina to protect it. God protected the people of the city, and a strong wind sent the armies away.

Large armies came to attack Medina. Salman al-Farisi (may God be pleased with him) suggested digging a trench to guard the open side of the city. The Muslims were patient and worked together until the armies left, by God's leave, and a strong wind was a sign of God's help.

Storytellers (10–12) read the Explorers text, then cross to the Scholars text.

In Shawwal of the fifth year after the Hijra, a coalition of Meccans and allied tribes marched on Medina. On Salman al-Farisi (may God be pleased with him)'s advice the Muslims dug a trench on the northern side, and they stayed patient for nearly a month. The sources tell of the Banu Qurayza breaking their pact, of Nu'aym ibn Mas'ud's stratagem that divided the armies, and of a strong wind at night. The reports differ on the size of the armies, so each number needs a source. This entry gives the events of the trench as the sira books tell them, and shows how counsel and patience protected the city.

From Sheikh Omar Abdelkafy's Tafsir lectures (episode 3)

In a linguistic comment made in the course of his commentary, unrelated to the Trench itself, the Sheikh explains the word hiqba and says the Arabs reckoned it at eighty years and some reckoned it at a hundred (needs_source) 1. He mentions that Musa used the word in his story with al-Khidr 1.

From Sheikh Omar Abdelkafy's Tafsir lectures (episode 4)

In another episode, again in a linguistic context unrelated to the Trench, the Sheikh says that ahqab either means years without end or a long span of time, as Musa said to his attendant 2.

From Sheikh Omar Abdelkafy's Tafsir lectures (episode 5)

The Sheikh relates that the night at the Trench was so bitterly cold that two of the Companions wrapped themselves in a single garment, and that the Prophet ﷺ said: who will cross the trench and bring me news of the enemy, without causing any incident? No one answered him (needs_source) 3. He says the Prophet repeated the request, that the night was at the end of the month and the place was dark, and that the Companion crossed and Abu Sufyan passed in front of him at a very short distance (needs_source) 4. He mentions that the Companion thought that Abu Sufyan was the head of the group and that killing him might end the matter, but remembered the Prophet's words not to start anything, so he held back his sword and stopped at the limits set by God (needs_source) 5.

From Sheikh Omar Abdelkafy's lecture series Al Dinu Al Qayem

The speaker names the Battle of the Confederates, also called the Trench, and mentions Ghatafan in its context. He holds (speaker's view, opinion) that the present day resembles it 6.

The speaker's view (opinion): Muslims today do not learn the language, the thinking or the view of others toward them. He says that at the Battle of the Confederates God sent a wind and hosts that they did not see, and the matter ended 7.

He says the Qur'an describes that battle in an extraordinary way: the believers were shaken, hearts reached the throats, until God's help came 8.

He recounts Hudhayfa ibn al-Yaman (may God be pleased with him)'s account of a freezing night, when the Prophet asked who would go to the enemy and bring back news without starting anything. Hudhayfa rose into the dark 9. Hudhayfa says Abu Sufyan was close to him, within a spear's thrust, and he held back because he remembered the Prophet's charge not to start anything against them 10.

The speaker's view (opinion): one man's deed is better than a thousand men's speeches, and the Battle of the Confederates is a model of the Muslims' victory through "there is no god but God" 11.

Your choice is kept in this browser only.

Opinions on the question

The question: How are the Battle of the Trench and its outcome read in the Sunni tradition and by historians?

First opinion · Sunni tradition (the museum's frame)Main reference

Sunni sira tradition records the battle as a pivotal turning point where the united polytheist and tribal coalition failed to extinguish Islam, fulfilling the divine promise in Surat al-Ahzab.
More opinions (1)

Academic viewSecondary opinion

Historians analyze the siege as an economic and diplomatic crisis for the confederates, where prolonged stalemate, bad weather, tribal fragmentation, and intelligence operations neutralized their numerical advantage.

Connections

Explore the connections

Had participant
Abdullah ibn Umar ibn al-Khattab· Abu Sufyan ibn Harb· Amr ibn Hazm· Hudhayfa ibn al-Yaman· Ka'b ibn Asad· Nu'aym ibn Mas'ud· Rufayda al-Aslamiyya· Safiyya bint Abd al-Muttalib· Sallam ibn Abi al-Huqayq (Abu Rafi')· Salman al-Farisi· Ubayy ibn Ka'b· Uqba ibn Amir ibn Nabi· Zayd ibn Arqam· Zayd ibn Thabit· Banu Qurayza· The early Muslim community· Muhammad· Ali ibn Abi Talib· Sa'd ibn Mu'adh· Huyayy ibn Akhtab
Occurred at
Medina
Part of
The Prophetic Era
Has part
Ali's duel with Amr ibn Abd Wudd at the Trench
Led to
The Siege and Judgment of Banu Qurayza· The Treaty of Hudaybiyya
Mentioned in
Muwatta 506
Revealed in
Qur'an 33:9

People and things also explored

Medina· Muhammad· The Battle of Uhud· The Siege and Judgment of Banu Qurayza· The Ansar· The Battle of Badr· The early Muslim community· The build-up to Badr: Abu Sufyan's caravan, Mecca's muster and the Prophet's march

Sources

  1. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Tafsir Al Quran Al Qareem, episode 3, at 00:55:00 · Listen at the archive (opens the audio at this time)
  2. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Tafsir Al Quran Al Qareem, episode 4, at 00:49:00 · Listen at the archive (opens the audio at this time)
  3. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Tafsir Al Quran Al Qareem, episode 5, at 00:52:30 · Listen at the archive (opens the audio at this time)
  4. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Tafsir Al Quran Al Qareem, episode 5, at 00:53:00 · Listen at the archive (opens the audio at this time)
  5. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Tafsir Al Quran Al Qareem, episode 5, at 00:53:30 · Listen at the archive (opens the audio at this time)
  6. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 10, at 00:14:30 · Listen at the archive (opens the audio at this time)
  7. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 10, at 00:15:00 · Listen at the archive (opens the audio at this time)
  8. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 10, at 00:15:30 · Listen at the archive (opens the audio at this time)
  9. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 10, at 00:16:00 · Listen at the archive (opens the audio at this time)
  10. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 10, at 00:17:00 · Listen at the archive (opens the audio at this time)
  11. Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 10, at 01:00:30 · Listen at the archive (opens the audio at this time)
  • al-Raheeq al-Makhtum — Safi al-Rahman al-Mubarakpuri
  • Sahih al-Bukhari
  • Sahih Muslim
  • al-Sira al-Nabawiyya — Ibn Hisham
  • Zad al-Ma'ad — Ibn Qayyim al-Jawziyya
  • Asma al-Matalib fi Sirat Ali ibn Abi Talib, vol. 1 — Ali Muhammad al-Sallabi
Cite this page

islam.museum contributors. “The Battle of the Trench (al-Ahzab)”. islam.museum, https://islam.museum/en/event/battle-of-the-trench/. CC BY-SA 4.0. Last updated 2026-10-25.

Improve this page on GitHub · Report an error · JSON

Wing

Time

Eras, timelines, this day in history, any year in the Islamic world.
Related

Medina

City in the Hejaz to which the Prophet migrated in 622 CE; site of the Prophet's Mosque and the first Muslim community. The Prophet declared it a sanctuary as Abraham declared Mecca — its bounds 'between 'Ayr and Thawr' (or 'to Uhud' in the reading Abu 'Ubayd and al-Hazimi preferred) and 'between its two lava fields'; within them hunting and tree-cutting are forbidden and the bloodwit for unintended killing is heavier. Samhudi counts nearly ninety-five names for it, among them Tayba, Taba and Yathrib.