Prophetic Biography · Quran topic

Battle of the Trench

غزوة الأحزاب · Ghazwat al-Ahzab

How sincere faith and prophetic guidance turned severe siege into lasting victory.

23 verses · 8 parts · 9 min read

Study guide based on

موسوعة التفسير الموضوعي للقرآن الكريم

مركز تفسير للدراسات القرآنية

«غزوة الأحزاب» · Volume 13

At a glance

The Battle of the Trench, also known as the Battle of al-Ahzab (the Confederates), was a defining turning point in early Islamic history. In the fifth year after the Hijrah, an unprecedented alliance of pagan Arab tribes and hostile factions marched on Madinah with ten thousand fighters, seeking to completely eradicate the nascent Muslim community. Outnumbered and facing danger from every side, the believers endured extreme cold, hunger, and psychological terror as the siege tightened around them.

Yet, this supreme trial revealed the profound distinction between sincere belief and covert hypocrisy. While the hypocrites spread panic and retreated into deceit, the believers embraced the crisis as the fulfillment of divine promise, deepening their submission to Allah. Through collective effort, military ingenuity, prophetic leadership, and ultimate divine intervention, the confederates were shattered without a single decisive pitched clash.

By reflecting on this battle, you learn that Allah's help often arrives when human means are exhausted. The Quran immortalizes these events in Surah al-Ahzab, offering enduring lessons on crisis leadership, steadfastness under duress, vigilance against internal betrayal, and utter reliance on Allah.

Key verses

  1. Al-Ahzab 33:9: Allah commands the believers to remember His divine favor when enemy armies gathered against them, only to be turned away by an invisible army of angels and a devastating wind.
  2. Al-Ahzab 33:22: This verse highlights the noble reaction of true believers when facing overwhelming enemies: rather than faltering, seeing the confederates only increased their faith and submission to Allah.
  3. Al-Ahzab 33:13: The Quran exposes the cowardice of the hypocrites, who discouraged others from standing firm and invented false excuses about their homes being exposed merely to flee the frontlines.

Words to know

غزوة الأحزاب Ghazwat al-Ahzab

The Battle of the Confederates, named after the hostile coalition of pagan tribes and factions that united to besiege Madinah, also called the Battle of the Trench (al-Khandaq) after the defensive trench dug around the city.

Introduction to the Battle of the Trench

From the paper: «التعريف بغزوة الأحزاب»

The campaign is known as the Battle of al-Ahzab because various pagan factions and tribes, headed by Quraysh and Ghatfan alongside Jewish factions, allied together to fight the Muslims Al-Ahzab 33:22. It is also named the Battle of the Trench (al-Khandaq) because Salman al-Farsi suggested digging a trench along the vulnerable northern plains of Madinah to bar the advancing army, a strategy unfamiliar to Arab warfare.

Allah immortalized the details of this battle in Surah al-Ahzab, naming the chapter after it to honor the Prophet, record his miracles, and mark a historic transition. After this battle, the Prophet declared that the enemies would never invade them again, but rather the Muslims would take the initiative. Allah granted victory to His Messenger through invisible soldiers of angels and a fierce wind Al-Ahzab 33:9.

According to the majority of biographical scholars (such as Ibn Ishaq, Ibn Sa'd, al-Waqidi, and Ibn Kathir), the battle occurred in Shawwal during the fifth year after the Hijrah. A second view places it in the fourth year, but scholars like Ibn al-Qayyim strongly favored the fifth year. The Muslims fortified themselves on the northern outskirts of Madinah, positioning their backs against Mount Sal' with the freshly dug trench between them and the confederate forces.

Causes of the battle

From the paper: «أسباب الغزوة»

The primary cause of the campaign stemmed from the continuous movement of Muslims across Arabia, which challenged Quraysh and threatened its vital trade routes. Quraysh eagerly sought an opportunity to eradicate Islam and eliminate the Prophet once and for all.

This opportunity materialized when the leaders of the expelled Jewish tribe of Banu al-Nadir, nursing deep resentment after their exile to Khaybar, coordinated a plot for revenge. Leaders like Sallam ibn Abi al-Huqayq and Huyayy ibn Akhtab formed a delegation that approached Quraysh and Ghatfan to incite a joint military campaign.

Quraysh readily agreed to break the economic pressure imposed by the Muslims, while Ghatfan joined out of desire for plundering Madinah's harvest. Other tribes soon joined the alliance. In their bid to incite pagan support, the Jewish leaders even testified that pagan idolatry was superior and more rightly guided than the monotheism preached by the Prophet. Concerning this betrayal, Allah revealed verses condemning those who were given a portion of the Scripture yet preferred disbelief over faith An-Nisa 4:51-52.

Beginning of the battle

From the paper: «بداية الغزوة»

The allied forces mobilized ten thousand fighters under Abu Sufyan's command against three thousand Muslims. When they arrived, they were stunned by the unexpected trench, turning the confrontation into a prolonged siege. The Quran depicts the sheer terror of this trial: enemies surrounded the city from above and below, eyes grew wild, hearts reached the throats, and believers were shaken with a severe shaking Al-Ahzab 33:9-11.

This crisis revealed two opposing internal realities:

  • The steadfast believers: When they saw the confederates, they declared this was what Allah and His Messenger had promised, and it only augmented their faith and total submission Al-Ahzab 33:22, recalling earlier divine reminders of hardship before victory Al-Baqarah 2:214.
  • The hypocrites: Sick-hearted individuals claimed Allah and His Messenger promised them nothing but delusion Al-Ahzab 33:12. They discouraged the army from defending the city, asking permission to leave under the lie that their homes were exposed Al-Ahzab 33:13. They had earlier sworn never to turn their backs Al-Ahzab 33:15, yet fleeing cannot avert decreed death Al-Ahzab 33:16-17. When danger loomed, they stared with rolling eyes like someone fainting at death Al-Ahzab 33:19, and once peace returned, they lashed the believers with sharp tongues, greedy for spoils Al-Ahzab 33:19 and wishing they were wandering bedouins safely distant from the fray Al-Ahzab 33:20.

Scenes of the battle in the Quran

From the paper: «مشاهد من الغزوة في القرآن»

The Quran offers an overarching summary of the battle in its opening address to the believers, reminding them of the divine favor bestowed upon them Al-Ahzab 33:9. When the enemy armies marched to annihilate the Muslim community, Allah dispatched against the confederates a piercing wind and unseen armies of angels. These divine forces struck terror into their ranks, overturned their cooking pots, uprooted their tents, and blew dust into their eyes. The Prophet confirmed that he was aided by the easterly wind, just as the people of 'Ad had been destroyed by a westerly gale.

The siege ended without a physical engagement between the armies. Allah turned the disbelievers back in full rage, entirely deprived of any victory, plunder, or success Al-Ahzab 33:25. Allah spared the believers from fighting through His omnipotence, proving that ultimate victory belongs solely to Him.

This decisive outcome permanently shifted the balance of power. The era of defending Madinah against invading armies came to an end, inaugurating an era where the Muslims would take the offensive and expand outwards toward Makkah and Tabuk.

Prophetic leadership in the battle

From the paper: «القيادة النبوية في الغزوة»

The Prophet stood as the ultimate exemplar of steadfastness, active participation, and spiritual connection during the siege, embodying the noble model praised in the Quran Al-Ahzab 33:21. His leadership was marked by four outstanding dimensions:

  • Consultation and tactical brilliance: He readily consulted his companions and adopted Salman al-Farsi's proposal to dig the trench, surprising the invading forces with an unfamiliar military barrier.
  • Firmness, discipline, and shared toil: He remained inside Madinah, organized digging teams, supervised security along the trench day and night despite the bitter cold, and personally broke the most stubborn boulders that exhausted his men.
  • Evident physical miracles: During the excavation, Allah granted him several physical miracles, including multiplying a modest meal prepared by Jabir to satisfy a thousand men, foretelling the future martyrdom of 'Ammar ibn Yasir, and producing miraculous light from a struck rock while announcing the future conquests of Syria, Persia, and Yemen.
  • Constant supplication: He continually raised his hands in humble prayer, asking the Revealer of the Book and the Swift in Reckoning to defeat the confederates and shake their resolve.

Quranic praise of the believers in the battle

From the paper: «ثناء القرآن على المؤمنين في الغزوة»

The Quran offers supreme praise to the sincere believers who proved true to the covenant they made with Allah Al-Ahzab 33:23. Among them were men who fulfilled their vow through martyrdom, like Hamzah, Mus'ab ibn 'Umayr, and Anas ibn al-Nadr, while others remained steadfastly waiting for their opportunity, never altering their commitment in the slightest.

This divine commendation highlights true spiritual maturity. Sincerity, steadfastness, and an unshakeable bond with Allah represent the pinnacle of character, whereas hypocrisy, cowardice, and broken oaths strip a person of genuine dignity. These men waited eagerly for their meeting with Allah, counting the days in this worldly life like a lover awaiting an appointment.

By contrasting these sincere souls with the hypocrites, the Quran draws a sharp educational contrast Al-Ahzab 33:24. Allah rewards the truthful for their honesty and punishes the hypocrites if He wills, or accepts their repentance if they turn back. True faith does not waver when circumstances change: it remains anchored in absolute trust in Allah's promise.

Stance of Banu Qurayza in the battle

From the paper: «موقف بني قريظة في الغزوة»

During the height of the siege, the Jewish tribe of Banu Qurayzah committed treason by tearing up their defense pact with the Prophet. Living in the southeastern highlands of Madinah, their betrayal threatened the Muslims with a deadly attack from the rear while the allied forces pressed from the front.

Once the confederates retreated and the siege lifted, the Prophet returned home and laid down his arms. Jibril immediately appeared, commanding him not to lay down arms but to march at once against Banu Qurayzah. The Muslims surrounded their fortresses until the tribe surrendered and agreed to submit to the arbitration of Sa'd ibn Mu'adh, an ally from their pre-Islamic days Al-Anfal 8:27.

Sa'd judged according to divine justice: their combatants were to be executed, their dependents taken captive, and their properties distributed. The Prophet affirmed that Sa'd had judged with the ruling of Allah. Allah cast terror into their hearts, brought them down from their strongholds Al-Ahzab 33:26, and granted the believers their lands, homes, and wealth, as well as lands they had not yet trodden Al-Ahzab 33:27, marking a comprehensive victory over betrayal.

Lessons learned from the Battle of the Trench

From the paper: «الدروس المستفادة من غزوة الأحزاب»

The events of the trench provide enduring guidance for believers across all generations:

  • Gratitude for divine aid: Victory is a pure gift from Allah through His decree, angels, and natural forces, requiring unending praise and humility.
  • The necessity of consultation: An effective leader values mutual counsel, seeks innovative solutions, and shares directly in the hardships of the community.
  • Contrasting faith and hypocrisy: Sincere believers respond to severe trials with increased conviction and trust in Allah, whereas hypocrites succumb to cowardice, spread demoralizing rumors, and flee responsibility.
  • Certainty regarding life's appointed term: Fleeing from hardship or danger never prolongs life, nor does standing firm hasten one's decreed time of death.
  • The power of humble supplication: In moments of intense vulnerability, persistent prayer remains an essential weapon and a source of divine tranquility.
  • The disastrous end of treason: Betraying trusts, breaking solemn covenants, and aligning with evil against truth ultimately invites disgrace and ruin.

Takeaways

  1. Severe trials are designed to purify your faith

    When overwhelming crises shake your life, recognize that hardship is an intentional test from Allah. Facing adversity with patience and absolute trust deepens your submission rather than driving you into despair.

  2. Fleeing duty will never postpone your appointed hour

    Running away from obligations out of fear of death or loss is completely futile. Your lifespan is strictly determined by Allah, so choose to live honorably in obedience rather than retreating in cowardice.

  3. Effective leaders lead by personal sacrifice

    The Prophet did not issue commands from a distance; he labored in the trench, endured hunger alongside his companions, and tackled the hardest physical tasks. True leadership is defined by shared sacrifice and mutual consultation.

  4. Never lose trust in Allah's promise during dark times

    Even while completely encircled by enemies, the Prophet gave glad tidings of future spiritual triumphs over great empires. Maintaining positive expectations of Allah in moments of difficulty is a core trait of sincere belief.

  5. Uphold your covenants and beware of treachery

    Breaking promises and betraying mutual trust brings severe consequences in this life and the next. Sincere believers remain faithful to their vows to Allah and people, even under extreme pressure.

Reflect

  • When sudden hardship strikes, does it push you closer to Allah in trust, or do doubts and complaints begin to surface?
  • In what areas of your daily life are you tempted to make excuses to avoid difficult moral duties?
  • How can you implement the Prophet's example of mutual consultation and shared effort within your family or community?
  • What steps can you take to guard your heart against the traits of hypocrisy, such as spreading negativity or desiring gain without effort?

Go deeper

Linguistic meaning

The term al-Ahzab (الأحزاب) linguistically denotes confederates, factions, or distinct groups of people who unite together for a shared cause or purpose.

Technical meaning

Technically, Ghazwat al-Ahzab refers to the major military siege of Madinah in the post-Hijrah era, where a confederacy of Arab polytheists and hostile Jewish factions allied together to eradicate the Muslim community, only to be turned back by divine intervention.

Every verse in the paper

All 23 verses the research paper discusses, grouped under its own headings.

Introduction to the Battle of the Trench «التعريف بغزوة الأحزاب»

Its names «أولًا: أسماؤها»

33:22

Wisdom behind naming a surah after it «ثانيًا: حكمة تسمية سورة باسمها»

33:9

Causes of the battle «أسباب الغزوة»

4:51-52

Beginning of the battle «بداية الغزوة»

Arrival of the confederates and their siege of Medina «أولًا: مجيء الأحزاب وحصارهم المدينة»

33:9-11

Stance of the believers upon seeing the confederates «ثانيًا: موقف المؤمنين عند رؤية الأحزاب»

33:22, 2:214

Stance of the hypocrites in the battle «ثالثًا: موقف المنافقين في الغزوة»

33:12-20

Scenes of the battle in the Quran «مشاهد من الغزوة في القرآن»

General description of the battle «أولًا: وصف عام للغزوة»

33:9

End of the battle «ثانيًا: نهاية الغزوة»

33:25

Prophetic leadership in the battle «القيادة النبوية في الغزوة»

33:21

Quranic praise of the believers in the battle «ثناء القرآن على المؤمنين في الغزوة»

33:23, 33:24

Stance of Banu Qurayza in the battle «موقف بني قريظة في الغزوة»

33:26, 8:27, 33:27

About this source

موسوعة التفسير الموضوعي للقرآن الكريم

مركز تفسير للدراسات القرآنية

Volume
13
Research paper
«غزوة الأحزاب» (Battle of the Trench)

Read the full paper (Arabic)

Encyclopedia of Thematic Tafsir of the Noble Quran, published by the Tafsir Center for Quranic Studies.

This study guide summarizes the Arabic research paper. For full scholarly detail, refer to the original. This preview has not been reviewed yet.

Browse all Quran topics