Knowledge History & Heritage

Seerah: Ghazwat al-Ahzab — The Battle of the Trench (5 AH / 627 CE): The Siege That Failed

السِّيرَة: غَزوَةُ الأَحزَاب — غَزوَةُ الخَندَقِ (٥ هـ / ٦٢٧م): الحِصَارُ الَّذِي فَشَل
2 min read · 359 words

Ghazwat al-Ahzab (غَزوَةُ الأَحزَاب — the Campaign of the Confederates; also known as *Ghazwat al-Khandaq* — the Battle of the Trench; 5 AH / 627 CE) was the most dangerous threat Medina faced in the Prophet's lifetime: a coalition of approximately 10,000 soldiers from the Quraysh, the Ghatafan tribe, and various allied groups marched on Medina with the intention of destroying the Muslim community once and for all. The Prophet's response — on the advice of Salman al-Farsi, the Persian companion — was to dig a wide, deep trench (*khandaq*) across Medina's northern approach, an Arab warfare innovation the enemy was completely unprepared for. The siege lasted approximately three weeks, and the confederation withdrew without achieving their objective, after internal fractures, bad weather, and what the Muslims understood as divine assistance.

Context and the Confederation

After the defeat at Uhud (625 CE), the Quraysh and allied tribes saw an opportunity to eliminate the Muslim community before it grew stronger. The Banu al-Nadir (a Jewish tribe expelled from Medina in 625 CE) played a key role in organizing the confederation against the Muslims — traveling to the Quraysh and Ghatafan to coordinate the assault.

The coalition assembled approximately 10,000 fighters — an overwhelming force against Medina’s 3,000 defenders.


The Trench

Salman al-Farsi suggested an innovative strategy: dig a trench across the northern approach to Medina, protecting the side that was naturally unprotected. The Prophet organized the Muslims into groups, each responsible for a section. The Prophet himself participated in digging.

A famous miracle occurred during the digging: a hard rock resisted all tools. The Prophet struck it three times with a pick, and with each blow he said: “Allahu Akbar — I have been given the keys of Syria / Persia / Yemen.” — prophesying the future Islamic conquests.


The Siege — Three Weeks

The confederation arrived to find the trench — an approach they had no answer for. Arab cavalry tactics required open field engagement; the trench prevented this. For three weeks:


The Resolution

The Banu Qurayza (the remaining Jewish tribe inside Medina) reportedly negotiated with the confederation to attack the Muslims from within. The Prophet sent envoys to verify. Their reported treachery created an additional crisis — potential enemies on two fronts.

Divine intervention: The Quran (33:9): “O you who have believed, remember the favor of Allah upon you when armies came to [attack] you and We sent against them a wind and armies [of angels] you did not see.”

A powerful storm struck the confederation’s camp, destroying their tents and disrupting their supplies. Internal disagreements between the Quraysh and Ghatafan about whether to continue led to withdrawal.

See also: Prophet Muhammad, Seerah Medina, Seerah Badr, Seerah Uhud, Sahaba, Ali Ibn Abi Talib

← All articles
← Previous
Seerah: Fath Makkah — The Conquest of Mecca (8 AH / 630 CE): The Bloodless Triumph and General Amnesty
Next →
Ayyam Dhu al-Hijja — The First Ten Days of Dhu al-Hijja: The Best Days of the Year

More in History & Heritage

← Back to all articles