Battle of the Trench: The Siege of Medina and Islam’s Great Defense
Table of Contents
The Siege of Medina: Battle of the Trench
The poet’s words echoed the challenge that rang out across the field: “And he called, Amr, for the third time: ‘I have grown hoarse from calling out to your assembled host! Is there no challenger?’ He stood, while the brave hung back, in the position of one ready to duel. It was as if I had always been impulsive in the face of battle, for courage in a youth and generosity are among the finest of instincts.”
And so, a young man rose to answer the call. This is the story of that moment, and the great trial known as the Battle of the Trench.
The Gathering Storm
The year was five years after the Hijrah. The cause was rooted in betrayal. After the Prophet Muhammad (peace be upon him) exiled the tribe of Banu al-Nadir from Medina for breaking their treaty, their chieftains—Sallam ibn Mashkam, Sallam ibn Abi al-Huqayq, Huyayy ibn Akhtab, and Kinanah ibn al-Rabi—smarted from the humiliation. They embarked on a mission of vengeance, traveling first to the Quraysh in Mecca to incite them against the Messenger of God.
The Quraysh agreed. Then, the conspirators went to the tribe of Ghatafan, and their leader, Uyaynah ibn Hasan al-Fazari, also pledged his support. They were joined by Banu Asad, led by Talhah ibn Khuwaylid. A great confederacy was born. Abu Sufyan marched out, leading the Quraysh. When they reached Marr al-Zahran, they were reinforced by the tribe of Banu Sulaym. Ibn Ishaq recounts that the total number of disbelievers who descended upon the Trench was ten thousand men.
A Desperate Plan
When news of this massive army reached the Prophet (peace be upon him), he consulted his companions. It was Salman al-Farsi (may God be pleased with him) who offered a solution unknown to the Arabs: “O Messenger of God, we in Persia, when faced with a siege, would dig a trench.”
The Prophet immediately acted on this counsel. He ordered a trench to be dug and worked on it himself, shoulder-to-shoulder with the Emigrants and the Helpers. They carried the earth on their backs, their faith firm, chanting, “We are those who have pledged allegiance to Muhammad to strive in Jihad as long as we live!” And the Prophet (peace be upon him) would respond, “O Allah, there is no good except the good of the Hereafter. So bless the Helpers and the Emigrants.”
Al-Bara’ ibn ‘Azib (may God be pleased with him) narrated: “I saw the Messenger of God carrying soil from the trench until the dust covered the skin of his abdomen.” And as he worked, he would amplify the verses of Abdullah ibn Rawahah: “O Allah, were it not for You, we would not be guided, nor would we give charity, nor pray. So send down tranquillity upon us, and make our feet firm if we meet. Indeed, these people have transgressed against us, and if they seek to put us to trial, we refuse!”
Miracles in the Dirt
The digging was not without its wonders. Jabir ibn Abdullah (may God be pleased with him) told of a solid, compact patch of earth that their tools could not break. They called the Prophet, who took a pickaxe. Though his stomach was bound with a stone from hunger, and the people had not tasted food for three days, he struck the patch. It instantly transformed into soft, flowing sand, a miracle to strengthen their hearts.
In another narration from al-Bara’, they hit a massive, immovable rock. The Prophet (peace be upon him) descended, took the pickaxe, and said, “In the name of God!” He struck a blow and shattered a third of the rock, proclaiming, “God is the Greatest! I have been given the keys to Syria, and by God, I can see its red palaces from this very place!”
He struck a second time, shattering another third, and said, “God is the Greatest! I have been given the keys to Persia, and by God, I can see the white palace of Al-Mada’in from here!”
With the third and final strike, he declared, “God is the Greatest! I have been given the keys to Yemen, and by God, I can see the gates of Sana’a from this very spot!”
The Pangs of Hunger and a Blessed Feast
Those were days of severe hardship. Their food was meager: a little barley mixed with old, rancid butter, so foul in smell and taste that they sometimes went days without a morsel, surviving only on dates if they were to be found.
Jabir, seeing the profound hunger etched on the Prophet’s face, was moved to action. He went to his wife and they decided to sacrifice their only young goat and use their small measure of barley to prepare a meal for the Prophet and a few companions. But his wife whispered a fearful warning: “Don’t embarrass me before the Messenger of God and those with him!”
Jabir went and secretly invited the Prophet. But to his astonishment, the Prophet (peace be upon him) called out to the entire army, “O people of the Trench! Jabir has prepared a feast for you, so come along, you are welcome!”
Jabir was mortified. He rushed to his wife, who exclaimed in distress, “You have brought the entire Trench! Did I not tell you?!” But Jabir could only say, “The Prophet has done what he has done.”
When the Prophet arrived, he blessed the small amount of dough and the single pot of stew. He then instructed, “Call a baker to bake with me, and do not take the pot off the fire nor stop baking the bread.” Jabir swore by God, “They all ate until they were full and began to leave—a thousand men! And by God, our pot still boiled as full as ever, and our dough was still being baked.” It was a blessing from the hand of the Prophet.
The Ultimate Betrayal
The Muslims had positioned themselves with Mount Sal’ at their backs and the trench before them, their women and children safe in the fortresses. But then came the gravest danger of all: betrayal from within.
Huyayy ibn Akhtab, the instigator, went to Ka’b ibn Asad, the chief of the Jewish tribe of Banu Qurayzah, who had a treaty with the Muslims. Ka’b, knowing Huyayy was a man of ill-omen, initially refused to see him, shutting the gate of his fortress. But Huyayy taunted him, “You have shut your gate against me over a paltry meal?” So Ka’b let him in.
Huyayy promised him “the glory of the age,” boasting of the armies of Quraysh and Ghatafan. But Ka’b replied, “You have brought me everlasting disgrace! I have seen nothing from Muhammad but faithfulness and truth.” Yet Huyayy persisted, twisting his arm until Ka’b finally agreed to break the treaty.
When the Prophet (peace be upon him) learned of this, he sent a delegation to confirm it. They were met with insults and confirmation of the betrayal. Now, the Muslims were trapped, with the Confederates in front and Banu Qurayzah ready to attack from the rear. Fear gripped their hearts, a terror so profound that the Quran would later describe it: “When they came upon you from above you and from below you, and when eyes grew wild and hearts reached to the throats…”
The Duel of Champions
The trench had stalled the main army, but a small band of Quraysh champions found a narrow point and crossed. Among them was the legendary warrior, ‘Amr ibn Abd Wudd. He rode out, his arrogance filling the space between the armies, and bellowed, “Is there no challenger?”
A young Ali ibn Abi Talib stood up. “I am for him, O Messenger of God!”
The Prophet (peace be upon him) gently said, “Sit down, it is ‘Amr.”
‘Ali sat. ‘Amr called out a second time, mocking them. Again, ‘Ali stood, and again, the Prophet asked him to sit.
Then ‘Amr called for the third time, his poetry ringing with challenge and contempt. This time, ‘Ali would not be held back. “I am for him, O Messenger of God!”
The Prophet replied, “Indeed, it is ‘Amr.”
“Even if it is ‘Amr,” said Ali, and this time, the Prophet gave his permission.
Ali advanced, reciting his own lines of poetry: “Do not be hasty, you have been answered by one who is capable… I hope to perform your funeral rites with a thrust that will be remembered in the arenas of war.”
‘Amr, recognizing him, said, “O son of my brother, I do not wish to kill you.” But Ali replied with a courage that shook the field, “But I, by God, do not dislike the idea of shedding your blood!”
Enraged, ‘Amr charged. Their swords clashed. Ali deflected a mighty blow with his shield and, in one fluid motion, struck ‘Amr on the shoulder, sending the giant to the ground. A unified cry of “Allahu Akbar!” erupted from the Muslim lines. The champion had fallen. Ali returned, walking calmly, his own poetry celebrating the victory, a testament to his faith and valor.
The Divine Wind
The siege dragged on, and the pressure mounted. The Prophet (peace be upon him) even attempted to negotiate with the Ghatafan, offering them a share of Medina’s dates to withdraw. But the Ansar leaders, Sa’d ibn Mu’adh and Sa’d ibn ‘Ubadah, refused with proud, unwavering faith. “If this is a command from God, we obey. But if it is your own stratagem, by God, we will not give them a single date except by the sword!”
Just when the situation seemed most hopeless, help came from an unexpected source. A man from Ghatafan, Nu’aym ibn Mas’ud, had embraced Islam in secret. He came to the Prophet and offered his service. The Prophet told him, “War is deception. Do what you can to sow discord among them.”
Nu’aym, trusted by all parties, went first to Banu Qurayzah. “Quraysh may grow weary and abandon you,” he warned. “Do not fight alongside them until they give you hostages as a guarantee.” They agreed it was wise counsel.
He then went to the Quraysh and whispered, “The Jews have regretted their betrayal. They will demand hostages from you only to hand them over to Muhammad as a peace offering.” The Quraysh grew suspicious.
When the Quraysh then called on Banu Qurayzah to fight, the Jews replied, “We will not fight until you give us hostages.” The Quraysh looked at each other and said, “See? Nu’aym was right!” They refused to send hostages. And Banu Qurayzah said, “Nu’aym told us the truth!” The mighty Confederacy was crumbling from within, paralyzed by mistrust.
Then, God sent His final, decisive aid. On a dark, bitterly cold night, a violent, tempestuous wind descended upon the enemy camp. It tore their tents from the ground, extinguished their fires, and overturned their cooking pots. Terrified, demoralized, and freezing, their alliance in tatters, they lost all will to fight.
Abu Sufyan gave the order. The great army, ten thousand strong, packed up and retreated in disgrace. The siege was over. God had sent a wind and armies they could not see, answering the Prophet’s prayer: “O Allah, Revealer of the Book, Swift to account, defeat the Confederates! O Allah, defeat them and shake them!”
The Muslims were saved. Not by sheer force, but by faith, patience, a clever trench, a blessed duel, a cunning stratagem, and finally, the divine wind that secured their victory. The Battle of the Trench remains an eternal lesson that when believers put their trust in God, no alliance of enemies, no matter how powerful, can ever prevail.
Good Read in Our Website History And Architecture of Masjid Nabawi