Battle of the Trench

The Battle of the Trench (غزوة الخندق‎, Ghazwat al-Khandaq), also known as the Battle of the Confederates (غزوة الاحزاب‎,  Ghazwat al-Ahzab), was a 30-day-long siege of Yathrib (now Medina) by Arab and Jewish tribes. The strength of the confederate armies is estimated around 10,000 men with six hundred horses and some camels, while the Medinan defenders numbered 3,000.

The largely outnumbered defenders of Medina, mainly Muslims led by Islamic prophet Muhammad, dug a trench on the suggestion of Salman Farsi,[5] which together with Medina’s natural fortifications, rendered the confederate cavalry (consisting of horses and camels) useless, locking the two sides in a stalemate. Hoping to make several attacks at once, the confederates persuaded the Muslim-allied Medinan Jews, Banu Qurayza, to attack the city from the south. However, Muhammad’s diplomacy derailed the negotiations, and broke up the confederacy against him. The well-organised defenders, the sinking of confederate morale, and poor weather conditions caused the siege to end in a fiasco.

The siege was a “battle of wits”, in which the Muslims tactically overcame their opponents while suffering very few casualties. Efforts to defeat the Muslims failed, and Islam became influential in the region. As a consequence, the Muslim army besieged the area of the Banu Qurayza tribe, leading to their surrender and enslavement or execution.

The defeat caused the Meccans to lose their trade and much of their prestige.[4]


The battle is named after “trench”, or khandaq, that was dug by Muslims in preparation for the battle. The word khandaq (خندق) is the Arabised form of the Persian word kandak (meaning “that which has been dug”).[6]Salman farsi the Persian advised Muhammad to dig a trench around the city. The battle is also referred to as the Battle of Confederates (غزوة الاحزاب). The Qur’an uses the term confederates (الاحزاب) in sura Al-Ahzab[Quran 33:9–32] to denote the confederacy of non-believers and Jews against Islam.


Site of the Battle of the Trench, Medina

After their expulsion from Mecca, the Muslims fought the Meccan Quraysh at the Battle of Badr in 624,[7] and at the Battle of Uhud in 625.[8] Although the Muslims neither won nor were defeated at the Battle of Uhud, their military strength was gradually growing. In April 626 Muhammad raised a force of 300 men and 10 horses to meet the Quraysh army of 1,000 at Badr for the second time. Although no fighting occurred, the coastal tribes were impressed with Muslim power. Muhammad also tried, with limited success, to break up many alliances against the Muslim expansion. Nevertheless, he was unable to prevent the Meccan one.[9]

As they had in the battles of Badr and Uhud, the Muslim army again used strategic methods against their opponents (at Badr, the Muslims surrounded the wells, but did not deprive their opponents of water since Ali did not want to follow the footsteps of the Meccan army; at the Battle of Uhud, Muslims made strategic use of the hills). In this battle they dug a trench to render the enemy cavalry ineffective.[10]

Reason for battle

The reason for this battle was to defend Medina from attack, after Banu Nazir and Banu Qaynuqa tribes formed an alliance with the Quraysh to attack him as revenge for expelling them from Medina during the Invasion of Banu Qaynuqa and Invasion of Banu Nadir.[11][12] The Muslim scholar Ibn Kathir states: “The reason why the Confederates came was that a group of the leaders of the Banu Nadir, whom the Messenger of Allah had expelled from Al-Madinah to Khaybar, including Sallam bin Abu Al-Huqayq, Sallam bin Mishkam and Kinanah bin Ar-Rabi`, went to Makkah where they met with the leaders of Quraysh and incited them to make war against the Prophet”[13]

The Confederates

Early in 627, the Banu Nadir met with the Quraysh of Makkah. Huyayy ibn Akhtab, along with other leaders from Khaybar, travelled to swear allegiance with Safwan ibn Umayya at Makkah.[14]

The bulk of the Confederate armies were gathered by the Quraysh of Makkah, led by Abu Sufyan, who fielded 4,000 foot soldiers, 300 horsemen, and 1,000–1,500 men on camels.[15]

The Banu Nadir began rousing the nomads of Najd. The Nadir enlisted the Banu Ghatafan by paying them half of their harvest.[6][9] This contingent, the second largest, added a strength of about 2,000 men and 300 horsemen led by Unaina bin Hasan Fazari. The Bani Assad also agreed to join, led by Tuleha Asadi.[15] From the Banu Sulaym, the Nadir secured 700 men, though this force would likely have been much larger had not some of its leaders been sympathetic towards Islam. The Bani Amir, who had a pact with Muhammad, refused to join.[14]

Other tribes included the Banu Murra, with 400 men led by Hars ibn Auf Murri, and the Banu Shuja, with 700 men led by Sufyan ibn Abd Shams. In total, the strength of the Confederate armies, though not agreed upon by scholars, is estimated to have included around 10,000 men and six hundred horsemen. In January 627 the army, which was led by Abu Sufyan, marched on Medina.[3]

In accordance with the plan the armies began marching towards Medina, Meccans from the south (along the coast) and the others from the east. At the same time horsemen from the Banu Khuza’a left to warn Medina of the invading army.[14]

Muslim defence

The men from Banu Khuza’a reached Muhammad in four days, warning him of the Confederate armies that were to arrive in a week.[14] Muhammad gathered the Medinans to discuss the best strategy of overcoming the enemy. Meeting the enemy in the open (which led to victory at Badr), and waiting for them inside the city (a lesson learnt from the defeat at Uhud) were both suggested.[10] Ultimately, the outnumbered Muslims opted to engage in a defensive battle by digging deep trenches to act as a barrier along the northern front. The tactic of a defensive trench was introduced by Salman the Persian. Every capable Muslim in Medina including Muhammad contributed to digging the massive trench in six days.[16] The ditch was dug on the northern side only, as the rest of Medina was surrounded by rocky mountains and trees, impenetrable to large armies (especially cavalry). The digging of the ditch coincided with a near-famine in Medina. Women and children were moved to the inner city.[6][16] The Medinans harvested all their crops early, so the Confederate armies would have to rely on their own food reserves.[10][16]

Muhammad established his military headquarters at the hillock of Sala’ and the army was arrayed there;[6] this position would give the Muslims an advantage if the enemy crossed the trench.[9]

The final army that would defend the city from the invasion consisted of 3,000 men,[17] and included all inhabitants of Medina over the age of 14, except the Banu Qurayza (the Qurayza did supply the Muslims with some instruments for digging the trench).[9]

Siege of Medina

The siege of Medina began in January 627 and lasted for 27 days.[1] Since sieges were uncommon in Arabian warfare, the arriving confederates were unprepared to deal with the trenches dug by the Muslims. The Confederates tried to attack with horsemen in hopes of forcing a passage, but the Medinans were rigidly entrenched, preventing such a crossing.[4] Both of the armies gathered on either side of the trench and spent two or three weeks exchanging insults in prose and verse, backed up with arrows fired from a comfortable distance. According to Rodinson, there were three dead among the attackers and five among the defenders. On the other hand, the harvest had been gathered and the besiegers had some trouble finding food for their horses, which proved of no use to them in the attack.[18]

The Quraysh veterans grew impatient with the deadlock. A group of militants led by ‘Amr ibn ‘Abd Wudd (who was thought to be equal to a thousand men in fighting[19]) and Ikrimah ibn Abi Jahl attempted to thrust through the trench and managed to effect a crossing, occupying a marshy area near the hillock of Sala. ‘Amr challenged the Muslims to a duel. In response, Ali ibn Abi Talib accepted the challenge, and was sent by Muhammad to fight. As Ali went to fight Amr ibn Abd Wudd, Muhammad said about Ali, “He is the embodiment of all Faith who is going to an encounter with the embodiment of all Unbelief.”[20]

Both the fighters got lost in the dust as the duel became intense. Finally, the soldiers heard scream(s) which hinted decisive blows, but it was unclear which of the two was successful. The slogan, ‘Allahu Akbar’ (God is the greatest) from the dust confirmed Ali’s victory. The confederates were forced to withdraw in a state of panic and confusion.[21] Ali, as per his principles, allowed Amr’s entourage to retreat; Ali never pursued a fleeing enemy.[22]

The Confederate army made several other attempts to cross the trench during the night but repeatedly failed. Although the confederates could have deployed their infantry over the whole length of the trench, they were unwilling to engage the Muslims at close quarter as the former regarded the latter as superior in hand-to-hand fighting.[4] As the Muslim army was well dug in behind the embankment made from the earth which had been taken from the ditch and prepared to bombard attackers with stones and arrows, any attack could cause great casualties.[18]

Banu Qurayza

The Confederates then attempted several simultaneous attacks, in particular by trying to persuade the Banu Qurayza to attack the Muslims from the south.[4] From the Confederates, Huyayy ibn Akhtab, a Khaybarian, the leader of the exiled tribe Banu Nadir, returned to Medina seeking their support against the Muslims.[23]

So far the Banu Qurayza had tried their best to remain neutral,[9] and were very hesitant about joining the Confederates since they had earlier made a pact with Muhammad.[24] When Akhtab approached them, their leader refused to allow him entry.[25]

Akhtab eventually managed to enter and persuade them that the Muslims would surely be overwhelmed.[4] The sight of the vast Confederate armies, surging over the land with soldiers and horses as far as the eye could see, swung the Qurayza opinion in the favour of the Confederacy.[25]

News of the Qurayzah’s supposed renunciation of the pact with Muhammad leaked out, and Umar promptly informed Muhammad. Such suspicions were reinforced by the movement of enemy troops towards the strongholds of the Qurayza.[10][25] Muhammad became anxious about their conduct,[26] and realised the grave potential danger the Qurayza posed. Because of his pact with the Qurayza, he had not bothered to make defensive preparations along the Muslims’ border with the tribe.[24] The Qurayza also possessed weaponry: 1,500 swords, 2,000 lances, 300 suits of armour, and 500 shields.[27]

Muhammad sent three leading Muslims to bring him details of the recent developments. He advised the men to openly declare their findings, should they find the Banu Qurayza to be loyal, so as to increase the morale of the Muslim fighters. However, he warned against spreading the news of a possible breach of the pact on the Qurayza’s part, so as to avoid any panic within Muslim ranks.[24][25]

The leaders found that the pact indeed had been renounced and tried in vain to convince the Qurayza to revert by reminding them of the fate of the Banu Nadir and Banu Qaynuqa at the hands of Muhammad.[25] The findings of the leaders were signalled to Muhammad in a metaphor: “Adal and Qarah“. Because the people of Adal and Qarah had betrayed the Muslims and killed them at the opportune moment, Maududi believes the metaphor means the Qurayza were thought to be about to do the same.[24]

Crisis in Medina

Muhammad attempted to hide his knowledge of the activities of Banu Qurayza; however, rumours soon spread of a massive assault on the city of Medina from Qurayza’s side which severely demoralised the Medinans.[28]

The Muslims found themselves in greater difficulties by day. Food was running short, and nights were colder. The lack of sleep made matters worse.[29] So tense was the situation that, for the first time, the canonical daily prayers were neglected by the Muslim community. Only at night, when the attacks stopped due to darkness, could they resume their regular worship.[28] According to Ibn Ishaq, the situation became serious and fear was everywhere.[30]

Quran describes the situation in surah Al-Ahzab:

Muslim response

Immediately after hearing the rumours about the Qurayza, Muhammad had sent 100 men to the inner city for its protection. Later he sent 300 horsemen (cavalry was not needed at the trench) as well to protect the city.[10] The loud voices, in which the troops prayed every night, created the illusion of a large force.[25]

The crisis showed Muhammad that many of his men had reached the limits of their endurance. He sent word to Ghatafan, trying to pay for their defection and offering them a third of Medina’s date harvest if they withdrew. Although the Ghatafan demanded half, they eventually agreed to negotiating with Muhammad on those terms. Before Muhammad began the order of drafting the agreement, he consulted the Medinan leaders. They sharply rejected the terms of the agreement,[29] protesting Medina had never sunk to such levels of ignominy. The negotiations were broken off. While the Ghatafan did not retreat they had compromised themselves by entering into negotiations with Medina, and the Confederacy’s internal dissension had thereby been increased.[4]

At about that point, Muhammad received a visit from Nuaym ibn Masud, an Arab leader who was well respected by the entire confederacy, but who had, unknown to them, secretly converted to Islam. Muhammad asked him to end the siege by creating discord amongst Confederates.

Nuaym then came up with an efficient stratagem. He first went to the Banu Qurayza and warned them about the intentions of the rest of the Confederacy. If the siege fails, he said, the Confederacy will not be afraid to abandon the Jews, leaving them at the mercy of Muhammad. The Qurayza should thus demand Confederate leaders as hostages in return for cooperation. This advice touched upon the fears the Qurayza had already harboured.[10][29]

Next Nuaym went to Abu Sufyan, the Confederate leader, warning him that the Qurayza had defected to Muhammad. He stated that the tribe intended to ask the Confederacy for hostages, ostensibly in return for cooperation, but really to hand over to Muhammad. Thus the Confederacy should not give a single man as hostage. Nuaym repeated the same message to other tribes in the Confederacy.[10][29]

Collapse of the Confederacy

Nuaym’s stratagem worked. After consulting, the Confederate leaders sent Ikrimah to the Qurayza, signalling a united invasion of Medina. The Qurayza, however, demanded hostages as a guarantee that the Confederacy would not desert them. The Confederacy, considering that the Qurayza might give the hostage to Muhammad, refused. Messages were repeatedly sent back and forth between the parties, but each held to its position stubbornly.[10][29]

Abu Sufyan summoned Huyayy ibn Akhtab, informing him of Qurayza’s response. Huyayy was taken aback, and Abu Sufyan branded him as a “traitor”. Fearing for his life, Huyayy fled to the Qurayza’s strongholds.[10][29]

The Bedouins, the Ghatafan and other Confederates from Najd had already been compromised by Muhammad’s negotiations. They had taken part in the expedition in hopes of plunder, rather than any particular prejudice against Islam. They lost hope as chances of success dwindled, uninterested in continuing the siege. The two confederate armies were marked by recriminations and mutual distrust.[29]

The provisions of the Confederate armies were running out. Horses and camels were dying out of hunger and wounds. For days the weather had been exceptionally cold and wet. Violent winds blew out the camp fires, taking away from the Confederate army their source of heat. The Muslim camp, however, was sheltered from such winds. The enemy’s tents were torn up, their fires were extinguished, the sand and rain beat in their faces, and they were terrified by the portents against them. They had already well nigh fallen out among themselves. During the night the Confederate armies withdrew, and by morning the ground was cleared of all enemy forces.[31]

Aftermath: Siege and demise of the Banu Qurayza

Following the retreat of the Confederate army, the Banu Qurayza neighbourhoods were besieged by the Muslims, in revenge. After a 25-day siege of their neighbourhood the Banu Qurayza unconditionally surrendered. When the Banu Qurayza tribe surrendered, the Muslim army seized their stronghold and their possessions.[32] On the request of the Banu Aus, who were allied to the Qurayza, Muhammad chose one of them, Sa’ad ibn Mu’adh, as an arbitrator to pronounce judgment upon them. Sa’ad, who would later die of his wounds from the battle, decreed the sentence according to the Torah, in which the men shall be killed and women and children enslaved. Deuteronomy 20:10–14 says:

When you march up to attack a city, make its people an offer of peace. If they accept and open their gates, all the people in it shall be subject to forced labor and shall work for you. If they refuse to make peace and they engage you in battle, lay siege to that city. When the Lord your God delivers it into your hand, put to the sword all the men in it. As for the women, the children, the livestock and everything else in the city, you may take these as plunder for yourselves. And you may use the plunder the Lord your God gives you from your enemies.[33]

Muhammad approved of this decision, and the next day the sentence was carried out.[32]

The men – numbering between 400 and 900[34] – were bound and placed under the custody of Muhammad ibn Maslamah, while the women and children were placed under Abdullah ibn Salam, a former rabbi who had converted to Islam.[10][35]

Ibn Ishaq describes the killing of the Banu Qurayza men as follows:

A number of individuals were spared when various Muslims intervened on their behalf.[38] Several accounts note Muhammad’s companions as executioners, Umar and Al-Zubayr in particular, and that each clan of the Aws was also charged with killing a group of Qurayza men.[39][40]

According to Ibn Ishaq’s biography of Muhammad, one woman who had thrown a millstone from the battlements during the siege and killed one of the Muslim besiegers, was also beheaded along with the men. ‘Ã’isha, one of Mohammad’s wives, is cited as describing the woman as laughing and chatting with her during the massacre, down to the moment her name was called out:

‘By Allah,’ she said,’ that is me.’ I said to her ‘You poor soul, what is to happen to you?’ She said:”I must be killed.” “Why?” I asked her. “For something I did,” she answered. She went away and was beheaded. By Allah,(‘Ã’isha adds) I shall never forget her cheerfulness and her great laugh when she knew that she was to be killed.’[38][41]

Ibn Asakir writes in his History of Damascus that the Banu Kilab, a clan of Arab clients of the Banu Qurayza, were also killed.[42]

The spoils of battle, including the enslaved women and children of the tribe, were divided up among the Muslims that had participated in the siege and among the emigrees from Mecca (who had hitherto depended on the help of the Muslims native to Medina.[43][44]

As part of his share of the spoils, Muhammad selected one of the women, Rayhana, for himself and took her as part of his booty.[44] Muhammad offered to free and marry her and according to some sources she accepted his proposal, while according to others she rejected it and remained Muhammad’s slave.[45] She is said to have later become a Muslim.[26]

Scholars argue that Muhammad had already decided upon this judgment before the Qurayza’s surrender, and that Sa’ad was putting his allegiance to the Muslim community above that to his tribe.[4] One reason cited by some for such punishment is that Muhammad’s previous clemency towards defeated foes was in contradiction to Arab and Jewish laws of the time, and was seen as a sign of weakness. Others see the punishment as a response to what was perceived as an act of treason by the Qurayza since they betrayed their joint defence pact with Muhammad by giving aid and comfort to the enemies of the Muslims.[10] Maxime Rodinson interprets the massacre as an astute political move that overrode all feelings of humanity, in order to remove a constant source of threat to Medina, and dishearten his enemies.[38]


The failure of the siege marked the beginning of Muhammad’s undoubted political ascendancy in the city of Medina.[46] The Meccans had exerted their utmost strength to dislodge Muhammad from Medina, and this defeat caused them to lose their trade with Syria and much of their prestige with it. Watt conjectures that the Meccans at this point began to contemplate that conversion to Islam would be the most prudent option.[4]

Islamic primary sources


The main contemporary source of the battle is the 33rd Surah of the Quran.

The Sunni Muslim Mufassir Ibn Kathir mentions that [Quran 33:10–22 (Translated by Yusuf Ali)] is about this incident in his book Tafsir ibn Kathir, and his commentary on this verse mentions the reason and event of the Battle, his commentary is as follows:


The event is referenced in the Sunni, Hadith collection Sahih al-Bukhari, it mentions the death of Sa’d ibn Mu’adh, as follows:

The Sahih al-Bukhari collection also mentions that after the battle, Muslims were to carry out offensive attacks against their enemies:[47]

Muhammad in order to stop the attacks called for a counter attack against the idolaters, He asserted to his followers before: Abdullah bin Abu Aufa reported: The Messenger of Allah (ﷺ) at one time when he confronted the enemy, and was waiting for the sun to set, stood up and said, “O people! Do not long for encountering the enemy and supplicate to Allah to grant you security. But when you face the enemy, show patience and steadfastness; and keep it in mind that Jannah lies under the shade of the swords.” Then he invoked Allah, saying, “O Allah, Revealer of the Book, Disperser of the clouds, Defeater of the Confederates, put our enemy to rout and help us in over-powering them”. [Al- Bukhari and Muslim].(46)

The event is also mentioned in the Sahih Muslim Hadith collection as follows:

Biographical literature

The incident also is mentioned in the historical works by writers of the third and fourth century of the Muslim era.[48] These include the traditional Muslim biographies of Muhammad, and quotes attributed to him (the sira and hadith literature), which provide further information on Muhammad’s life.[49] The earliest surviving written sira (biographies of Muhammad and quotes attributed to him) is Ibn Ishaq’s Life of God’s Messenger written some 120 to 130 years after Muhammad’s death. Although the original work is lost, portions of it survive in the recensions of Ibn Hisham and Al-Tabari.[50] Another early source is the history of Muhammad’s campaigns by al-Waqidi (d. 823).[48]


  1.   Watt, Muhammad at Medina, p. 36f.
  2.  Islamic Occasions. “Battle of al – Ahzab (Tribes), Battle of Khandaq (Dirch, Moat, Trench”. Retrieved 20 June 2016.
  3.   Rodinson, Muhammad: Prophet of Islam, p. 208.
  4.   Watt, Muhammad: Prophet and Statesman, pp. 167–174.
  5.  The Sealed Nectar by Safi-ur-Rahman.
  6.   Nomani, Sirat al-Nabi, pp. 368–370.
  7.  Peters, Muhammad and the Origins of Islam, p. 211—214.
  8.  Watt, Muhammad: Prophet and Statesman, p. 135.
  9.   Watt, Muhammad at Medina, pp. 34–37.
  10.   Ramadan, In the Footsteps of the Prophet, pp. 137–145.
  11.  Sa’d, Ibn (1967). Kitab al-tabaqat al-kabir2. Pakistan Historical Society. pp. 82–84. ASIN B0007JAWMK.
  12.  Mubarakpuri, The Sealed Nectar, pp. 196–198. (online)
  13.   Muhammad Saed Abdul-Rahman, Tafsir Ibn Kathir Juz’ 21 (Part 21): Al-Ankaboot 46 to Al-Azhab 30 2nd Edition, p. 122, MSA Publication Limited, 2009, ISBN 1861797338. (online)
  14.   Lings, Muhammad: his life based on the earliest sources, pp. 215f.
  15.   al-Halabi, al-Sirat al-Halbiyyah, p. 19.
  16.   Rodinson, p. 209.
  17.  Glasse & Smith, New Encyclopedia of Islam: A Revised Edition of the Concise Encyclopedia of Islam, p. 81.
  18.   Rodinson, pp. 209f.
  19.  Tabqaar ibn-e-Sadd 1:412, Anwaar Mohammadiya minal mawahib Page 84.
  20.  Razwy, Sayed Ali Asgher. “A Restatement of the History of Islam & Muslims”: 171.
  21.  Zafrulla Khan, Muhammad, Seal of the Prophets, pp. 177–179.
  22.  Razwy, Sayed Ali Asgher. “A Restatement of the History of Islam & Muslims”: 172.
  23.  Nomani, p. 382.
  24.   Maududi, The Meaning of the Quran, p. 64f.
  25.   Lings, pp. 221–223.
  26.   Watt, “Kurayza, Banu” Encyclopaedia of Islam.
  27.  Heck, “Arabia Without Spices: An Alternate Hypothesis”, pp. 547–567.
  28.   Peterson, Muhammad. Prophet of God, p. 123f.
  29.   Lings, pp. 224–226.
  30.  Peters Muhammad and the Origins of Islam, p. 221f.
  31.  Lings, pp. 227f.
  32.   Watt, Muhammad: Prophet and Statesman, pp. 170–176.
  33.  Deuteronomy 20:10–14, New International Version.
  34.   Guillaume, The Life of Muhammad: A Translation of Ibn Ishaq’s Sirat Rasul Allah, p. 461-464.
  35.  Muir, A Life of Mahomet and History of Islam to the Era of the Hegira, pp. 272–274.
  36.  Peters, Muhammad and the Origins of Islam, pp. 222–224.
  37.  Stillman, p. 141f.
  38.   Maxime RodinsonMohammad, (1961) Penguin Books 1971 p.213.
  39.  Kister, “The Massacre of the Banu Quraiza”, p. 93f.
  40.  Inamdar, Muhammad and the Rise of Islam, pp. 166f.
  41.  Muir (p. 277) (Ibn Ishaq, Biography of Muhammad).
  42.  Lecker, “On Arabs of the Banū Kilāb executed together with the Banū Qurayza”, p. 69.
  43.  Kister, “The Massacre of the Banu Quraiza”, pp. 95f.
  44.   Rodinson, Muhammad: Prophet of Islam, p. 213.
  45.  Ramadan, p. 146.
  46.  Watt, Muhammad: Prophet and Statesman, p. 96.
  47.  [Dr. M. Sa’id Ramadan Al-Buti – “Jurisprudence of Muhammad’s Biography”, p. 73, English edition, published by Azhar University of Egypt (1988)]
  48.   Watt, Muhammad at Mecca, p. xi.
  49.  Reeves, Muhammad in Europe: A Thousand Years of Western Myth-Making, p. 6–7.
  50.  Donner, Narratives of Islamic Origins: The Beginnings of Islamic Historical Writing, p. 132.

From Wikipedia, the free encyclopedia