Where the story is told

The main account is in Surah al-Ahzab, verses 9 to 27. The surah takes its name from the confederates, the allied groups who came against Madinah. Quran 33:9 begins by reminding the believers to remember Allah's favor upon them.

More details come from authentic hadith in Sahih al-Bukhari (4098-4106) and Sahih Muslim (1803-1805), which describe the digging of the trench and the hardship of those days.

The armies and the trench

The meaning of Quran 33:9 is that armies came against the believers, and Allah sent upon them a wind and forces that the believers could not see. Verse 10 says the enemy came from above and from below, the eyes turned away in fear, the hearts reached the throats, and some people had doubts about Allah.

The hadith tell us how the Muslims prepared. The Muhajirun (those who migrated from Makkah) and the Ansar (the people of Madinah) dug the trench around Madinah and carried the earth on their backs, as reported in Sahih al-Bukhari 4100. In Sahih al-Bukhari 4098 and Sahih Muslim 1804, Sahl ibn Sa'd (may Allah be pleased with him) says the Prophet ﷺ was with them while they dug.

They worked while hungry and tired. Al-Bara' (may Allah be pleased with him) said that dust covered the Prophet's ﷺ stomach as he carried earth with them. He recited lines saying that without Allah they would not have been guided, and asking Him to send down tranquility and make their feet firm (Sahih al-Bukhari 4106; Sahih Muslim 1803). The companions also said lines about their pledge to stand firm, and the Prophet ﷺ answered with a dua for the Muhajirun and the Ansar (Sahih al-Bukhari 4100; Sahih Muslim 1805).

Hunger, a hard rock and a shared meal

Jabir ibn Abdullah (may Allah be pleased with him) reported that a very hard rock stopped the digging. The Prophet ﷺ said that he would go down to it. He stood with a stone tied on his belly, since they had not tasted food for three days. He then struck the rock with a pickaxe and it became loose sand (Sahih al-Bukhari 4101).

Jabir then saw the Prophet's ﷺ hunger and went home. He and his wife prepared a small meal from a young goat and a measure of barley. He invited the Prophet ﷺ with only a few people, but the Prophet ﷺ called the people of the trench, and they were about a thousand. Jabir swears in the hadith that they all ate until they left the food, and the pot and the dough were still as full as before (Sahih al-Bukhari 4102).

Fear, doubt and faith

The Quran describes two kinds of reactions. In verses 12 to 20, hypocrites and those with disease in their hearts said that Allah and His Messenger had promised only delusion. Some asked permission to leave, saying their houses were exposed, and the Quran says they wanted only to flee. Verse 11 says the believers were tested and shaken severely.

In contrast, verse 22 says that when the believers saw the confederates, they said, in meaning, that this is what Allah and His Messenger promised, and that Allah and His Messenger spoke the truth, and it only increased their faith and submission. Verse 23 praises men who were true to their pledge to Allah.

In verse 21, Allah tells us that in the Messenger of Allah there is an excellent example for those who hope in Allah and the Last Day and remember Allah often. The hadith show this example in practice: the Prophet ﷺ worked beside his companions, shared their hunger and prayed for them. In Sahih al-Bukhari 4115, he also made dua against the confederates, asking Allah to defeat them and shake them.

How it ended

Quran 33:25 says Allah turned back the disbelievers in their rage, without any gain, and that Allah sufficed the believers in the fighting. The Prophet ﷺ said that he was helped by the east wind (as-Saba), while the people of 'Ad were destroyed by the west wind (Sahih al-Bukhari 4105). When the confederates withdrew, he said that from then on the believers would march against them and they would no longer march against the believers (Sahih al-Bukhari 4110).

Verses 26 and 27 then speak of Banu Qurayzah, a group among the People of the Scripture who had supported the confederates. The meaning of the verses is that Allah brought them down from their fortresses and cast fear into their hearts, so that some were killed and some taken captive. A hadith in Sahih al-Bukhari 3043 says they accepted the judgment of Sa'd ibn Mu'adh (may Allah be pleased with him), and the Prophet ﷺ said that he had judged by the judgment of the King, meaning Allah.

What the sources do not tell us

The Quran does not give the number of the armies, the names of the groups, the length of the siege or the exact place of the trench. Some later books give such figures. They are not in the verses we rely on here, so we do not repeat them as certain facts.

We have also left out reports about who first suggested digging the trench, because they are not found in the authentic hadith we checked here. The strong points of the story are the ones the Quran and the sound hadith state clearly.

Lessons from this story

  • Hardship tests every heart. The same siege made some people doubt and made others grow in faith, as Quran 33:12 and 33:22 show.
  • The Prophet ﷺ is an excellent example, not only in worship but also in hard days. He dug, carried earth, went hungry and prayed beside his companions.
  • Preparation and trust in Allah go together. The Muslims dug the trench with their own hands, and Allah sent the wind and unseen forces.
  • Help can come from places we do not expect. Quran 33:9 mentions a wind and armies that the believers could not see.
  • Faith grows through trial. When the believers saw the danger, the Quran says it only increased them in faith and submission.
  • Keeping a pledge to Allah is a mark of sincerity, as Quran 33:23 says of the true men.

General information for learning, not a fatwa. For your own situation, ask a qualified scholar.

Sources