The Battle of the Trench (al-Khandaq)
The Battle of the Trench (Ghazwat al-Khandaq, also called Ghazwat al-Ahzab, the Battle of the Confederates) took place in Shawwal-Dhul Qa'dah 5 AH (627 CE). It was a critical siege in which a coalition of 10,000 Quraysh, Ghatafan, and other Arab tribes, organized with the help of the expelled Jewish tribe of Banu Nadir, marched on Medina to destroy the Muslim community once and for all. The Quran describes it in Surah al-Ahzab: "When they came at you from above you and from below you, and when eyes shifted and hearts reached the throats, and you assumed about Allah various assumptions" (Quran 33:10).
The Trench Strategy
When the Prophet learned of the massive enemy coalition, he consulted his companions. Salman al-Farisi, the Persian companion, suggested a strategy unknown in Arabia: digging a defensive trench around Medina's exposed northern flank (the other sides were protected by lava fields and date palm groves). The Prophet enthusiastically adopted the idea and personally participated in the digging, carrying earth on his back. The trench took approximately six days to complete. During the digging, the Prophet struck a rock that produced sparks, and he prophesied the conquest of Persia, Rome, and Yemen, demonstrating divine confidence even in the darkest moment.
The Siege
The coalition arrived and was confounded by the trench, which prevented their cavalry from attacking. They laid siege for approximately 27 days. The situation grew dire when the Jewish tribe of Banu Qurayzah (inside Medina) broke their treaty with the Prophet and allied with the coalition, creating a threat from within. The Muslims were surrounded: enemies from without and traitors from within. The Quran describes the believers' fear and the hypocrites' despair: "And when the hypocrites and those in whose hearts is disease said: Allah and His Messenger did not promise us except delusion" (Quran 33:12). The Prophet made continuous supplication.
The Divine Intervention
Allah sent a severe cold wind and unseen forces (angels) that devastated the enemy camp: their tents were torn down, their fires extinguished, their cooking pots overturned, and their horses and camels stampeded. Abu Sufyan declared: "O Quraysh, I do not see any of you in his place. The wind has been too strong for us and our vessels and tents have been destroyed." The coalition withdrew in disarray. The Prophet sent Hudhayfah ibn al-Yaman on a reconnaissance mission who confirmed the complete retreat. The Quran summarizes: "O you who believe, remember the favor of Allah upon you when armies came to you and We sent upon them a wind and armies you did not see" (Quran 33:9).
Aftermath and Significance
After the coalition's retreat, the Prophet dealt with Banu Qurayzah's treachery. They were judged by Sa'd ibn Mu'adh according to the ruling of the Torah for treason, resulting in the execution of the men who had participated in the betrayal. The Battle of the Trench was the last major offensive by the Quraysh against Medina. The Prophet declared: "Now we will march against them, and they will not march against us" (Sahih al-Bukhari). The siege demonstrated that the Muslim community could withstand the combined might of Arabia, and it marked the beginning of the shift in power from the Quraysh to the Muslims.