Loading...
Loading...
The Battle of the Trench, known in Arabic as Ghazwat al-Khandaq or Ghazwat al-Ahzab (the Battle of the Confederates), took place in Shawwal 5 AH (March 627 CE). It was the largest military confrontation the young Muslim community had faced, pitting the entire city of Medina against a vast coalition of hostile forces. The successful defence through an innovative trench strategy marked a decisive turning point in the struggle between the Muslims and the Quraysh.
After the expulsion of Banu Nadir from Medina in 4 AH, their leaders — particularly Huyayy ibn Akhtab and Sallam ibn Abi al-Huqayq — travelled to Mecca to forge an alliance with the Quraysh against the Muslims. They then secured the support of the Ghatafan confederation and several other Arab tribes by promising them a share of Khaybar's date harvest. The resulting coalition, referred to in the Quran as al-Ahzab (the Confederates), assembled a force estimated between 10,000 and 24,000 fighters — an army far exceeding anything previously mobilised in the Hijaz.
The Muslim forces numbered approximately 3,000, making a pitched battle in open terrain virtually impossible to win.
When news of the approaching army reached Medina, the Prophet Muhammad (peace be upon him) convened a war council. It was Salman al-Farisi who proposed digging a deep trench across Medina's northern approach, the only direction from which the city was vulnerable to a cavalry assault. The eastern and western flanks were protected by dense lava fields (harrah), and the southern side by thick groves of palm trees and fortified buildings.
The Prophet (peace be upon him) approved the plan, and the Muslims worked urgently for approximately six days to complete the excavation. The trench stretched roughly five kilometres, wide and deep enough to prevent horses and camels from crossing. The Prophet himself participated in the digging, and numerous reports describe the hardship and hunger the Muslims endured during this labour. Ibn Ishaq records that miraculous events occurred, including the multiplication of food brought by Jabir ibn Abdullah to feed the workers.
The confederate army arrived to find a defensive barrier completely unknown to Arabian warfare. Abu Sufyan, commanding the Quraysh contingent, was unable to deploy his cavalry advantage. The siege settled into a standoff lasting approximately twenty-five days.
During this period, Huyayy ibn Akhtab persuaded Banu Qurayza — the last major Jewish tribe in Medina and bound by treaty to the Muslims — to break their covenant and join the confederates. News of this treachery caused severe alarm within Medina, as it opened the possibility of a rear assault on the Muslim women and children sheltered in the southern quarters. The Quran captures the intensity of the moment: "When they came upon you from above you and from below you, and when eyes shifted in fear and hearts reached the throats" (Al-Ahzab 33:10).
A critical intervention came from Nu'aym ibn Mas'ud of the Ghatafan, who had secretly embraced Islam. With the Prophet's permission, he moved between the confederate factions, sowing distrust. He warned Banu Qurayza that the Quraysh might abandon them, and told the Quraysh that Banu Qurayza were having second thoughts. His efforts fractured the already fragile alliance.
The coalition's morale deteriorated further when a series of skirmishes at narrow crossing points of the trench failed to produce any breakthrough. The most notable incident was the crossing of Amr ibn Abd Wudd, a renowned Qurayshi champion, who was met and killed by Ali ibn Abi Talib in single combat — an encounter celebrated in Islamic historical literature.
Allah sent a bitter cold wind and an unseen army of angels against the confederates, as recorded in the Quran: "O you who have believed, remember the favour of Allah upon you when armies came to you and We sent upon them a wind and armies you did not see" (Al-Ahzab 33:9). The storm overturned tents, scattered fires, and panicked the animals. Demoralised and divided, Abu Sufyan ordered the withdrawal. By morning, the vast camp was deserted.
Following the siege, the Prophet (peace be upon him) turned his attention to Banu Qurayza, whose breach of the treaty during the siege had endangered the entire Muslim community. Their fate was decided by the arbitration of Sa'd ibn Mu'adh, whom they themselves accepted as judge.
The Battle of the Trench effectively ended the Quraysh's ability to threaten Medina militarily. The Prophet (peace be upon him) declared afterward, as recorded by al-Bukhari: "Now we will march against them, and they will not march against us." From this point forward, the strategic initiative shifted permanently to the Muslims, leading to the Treaty of Hudaybiyyah the following year and ultimately the conquest of Mecca.
The Quran devoted much of Surah al-Ahzab to the events of this battle, praising the steadfastness of the believers who trusted in Allah's promise, and rebuking the hypocrites who had urged surrender and spread fear among the ranks.