The Battle of the Trench
The confederate siege of Madinah, 5 AH
A coalition (al-aḥzāb) of Quraysh, Ghatafan and allies laid siege to Madinah. On Salman al-Farisi's advice the Muslims dug a trench along the exposed northern flank of the city. Cold, hunger and a shifting wind broke the siege.
Overview
This lesson covers the confederate campaign of 5 AH — often called the Battle of the Trench (al-Khandaq) after the Muslim defence, and 'the day of the confederates' (al-Aḥzāb) after the attacking coalition. It covers the coalition's formation, the digging of the trench, the two-week siege, the diplomatic and military pressure, and the storm that broke the coalition.
Context
Between Uhud (3 AH) and 5 AH, tensions with the exiled Banu al-Nadir — a Jewish tribe of Madinah expelled after breaking their treaty and, according to the Seerah tradition, plotting to assassinate the Prophet ﷺ — pushed some of their leaders to organise a coalition against Madinah. They travelled to Makkah and to Ghatafan and other tribes and put together a joint force of around 10,000 fighters. This was by far the largest Arab army Madinah had faced.
What this means
Warned in time, the Prophet ﷺ consulted his companions. Salman al-Farisi, a Persian convert familiar with Sasanian siege warfare, proposed digging a trench along the exposed northern approach to Madinah — the other approaches were protected by volcanic rock, orchards and existing fortifications. The community, including the Prophet ﷺ himself, worked for weeks in the cold, hungry, tying stones to their stomachs to blunt the pain. Ibn Hisham and al-Bukhari preserve details: the moment a hard rock was struck and the Prophet ﷺ himself broke it with three blows, calling out promises of the future conquests of Syria, Persia and Yemen.
The siege
When the coalition arrived they were stopped by an obstacle they had not encountered in Arabia. They laid siege for around two weeks. A small cavalry force under ʿAmr ibn ʿAbd Wudd crossed at a narrow point and was met and killed by ʿAli. The most dangerous development was diplomatic: Banu Qurayẓa, the remaining major Jewish tribe still inside Madinah under treaty, were pressed by the coalition to switch sides. Their withdrawal from active loyalty to the treaty exposed the interior of the city. Muslim women and children had been moved to fortresses; that decision now looked crucial. According to Ibn Hisham, Nuʿaym ibn Masʿūd, a recent convert whose conversion was not yet public, worked to sow distrust between the coalition and Banu Qurayẓa.
The wind and the withdrawal
In the second week a cold storm rose. Tents were torn, cooking fires blew out, camels broke loose. In that night Abu Sufyan gave up. Ghatafan and the others followed. The coalition dispersed. Surat al-Aḥzāb 33:9–11 refers directly to the moment: '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… And they thought about Allah various thoughts.'
Banu Qurayẓa (a note in brief)
Immediately after the siege the Prophet ﷺ moved against Banu Qurayẓa, whose leadership had broken the treaty at the most dangerous moment of the campaign. This episode is complex and controversial in modern scholarship, and is treated fairly by referring the reader to a full separate lesson before drawing conclusions. This lesson focuses on the siege itself. See recommended further reading (Watt, Muhammad at Medina; Brown, Muhammad; primary accounts in Ibn Hisham).
Why this matters
The Trench was primarily a defensive victory achieved without a major battle. It showed the community capable of ingenuity, endurance, and holding together under conditions where earlier confederations would have fractured along tribal lines. The Prophet ﷺ himself said, according to al-Bukhari: 'Now we shall attack them, and they will not attack us.' Militarily, the initiative had shifted.
Application today
The Trench is a lesson in taking good advice from outside the majority culture. Salman was Persian, new to Arab warfare, and offered a solution no Arab tribe had thought of. The Prophet ﷺ adopted it immediately. A community that only listens to itself will not survive the confederate.
Timeline placement
Shawwal – Dhu al-Qaʿda 5 AH (Feb–Mar 627 CE). Follows Uhud; precedes the Treaty of Ḥudaybiyyah.
Reflection
The Prophet ﷺ took a solution from a newcomer with a very different background. Whose voice in your community is currently under-listened-to, and might your community be safer if you heard it?
