The battle of Khandaq story is not just a chapter from the Prophet’s biography but an epic filled with faith, wisdom, courage, and brilliant military planning.
This story reveals the genius of prophetic leadership and shows how treachery and conspiracy gathered together, only to be defeated by a decisive victory granted by Allah. Keep reading the article to learn the full story.
The Name of Battle of Khandaq
The battle was named Battle of Khandaq (Trench) after the trench that the Muslims dug around Madinah. It is also known as Ghazwat Al-Ahzab (The Battle of the Confederates) because several Arab tribes formed a coalition and united to invade Madinah and eliminate the Islamic state and its followers.
Reason For The Battle
Reason for the Battle: The Prophet Muhammad ﷺ expelled the Jews of Banu Nadir from their homes due to their betrayal of the pact and their attempt to assassinate him.
In retaliation, the Jews of Banu Nadir began inciting Arab tribes to invade Madinah, promising them support and assistance. Quraysh and its allies responded to this call.
The main reason Quraysh agreed to the invasion was their desire to break free from the economic hardship they suffered due to repeated raids on their trade caravans passing near Madinah. They also wished to fulfill their vow from the Battle of Uhud—to return and fight the Prophet. Thus began the battle of khandaq story.
Before the Battle
The battle of khandaq story began when Quraysh contacted their allies and managed to gather an army of ten thousand fighters, who began marching towards Madinah.
When the Prophet ﷺ received news of the approaching confederate army, he held an urgent meeting with the companions to consult on the best course of action.
Most companions from the Muhajireen and Ansar suggested facing the army outside Madinah. However, Salman Al-Farsi had a different opinion. He suggested digging a trench in the northern part of the city since the other sides were naturally protected by dense houses and trees that would prevent enemy entry.
The Prophet ﷺ was impressed by Salman’s idea. He assigned tasks among the companions so that every ten men would dig forty cubits of the trench. Despite the cold weather and food shortage, the Muslims began the work and completed the trench in 20 days.
Miracles during the battle of khandaq story
There are many miracles mentioned in the battle of khandaq story, including the following:
The First Miracle
While digging the trench, the companions encountered a huge rock they could not break. The Prophet ﷺ came, struck it with an axe saying “Bismillah,” and a strong spark shone as a third of it broke. He then said
“Allahu Akbar! I have been given the keys of Sham (Greater Syria); by Allah, I can see its red palaces now!”
He struck it a second time, and another spark appeared, breaking another third. He said
“Allahu Akbar! I have been given the keys of Persia. By Allah, I can see the white palace of Al-Mada’in (Ctesiphon) from this spot!”
With the third strike, the rock crumbled completely. The Prophet ﷺ also gave glad tidings of Islam reaching Yemen, and time later proved these prophetic promises to be true.
The Second Miracle
Among the miracles during the battle of Khandaq was one that eased the hunger and hardship endured by the companions after three days of hard labor. The Prophet ﷺ and his companions were so hungry that they tied stones to their stomachs.
Jabir ibn Abdullah noticed their suffering and rushed to his home, asking his wife to prepare food for the Prophet ﷺ. She ground their remaining barley and cooked it, while Jabir slaughtered a small goat.
Once the food was ready, Jabir went quietly to the Prophet ﷺ and invited him privately, mentioning that there wasn’t much food. But the Prophet ﷺ called out loudly and invited everyone who was digging the trench to come with him. He instructed Jabir not to touch the food until he arrived.
Jabir’s wife saw the crowds of Muhajireen and Ansar approaching and blamed him. He told her that the Prophet ﷺ was the one who invited them. The companions entered Jabir’s house, and the Prophet ﷺ broke the bread, placed meat on it, and covered the pot.
He continued serving them all until everyone was full. There was even food left over for Jabir’s household. This was one of the blessings of the Prophet ﷺ.
The Start Of Battle
The Start Of Battle occurred in the month of Shawwal, in the 5th year after Hijrah. After the trench was completed, the Prophet ﷺ moved the women and children to a fortified stronghold belonging to Banu Haritha for protection. He also ordered continuous patrols to guard the city from all directions.
When the coalition forces arrived, they were shocked to find a trench protecting Madinah. This barrier stopped them from storming the city, leaving them with no choice but to lay siege and search for a way to break in. However, the Muslims were alert and prevented their entry.
Betrayal of Banu Qurayza
This stage is considered one of the most critical in the battle of Khandaq story, as it marked the betrayal of Banu Qurayza.
Huyayy ibn Akhtab, a leader from Banu al-Nadir, came to them in an attempt to convince them to join the confederate forces against the Messenger of Allah ﷺ.
After many efforts, he persuaded them to break their treaty with the Prophet by tempting them with the large number and strength of the allied tribes. He promised them protection after the war once the armies had withdrawn.
When news of Banu Qurayza’s betrayal reached the Prophet ﷺ, he sent some of his companions to confirm the truth. As they approached the tribe, they found that Banu Qurayza had broken the treaty, torn up the agreement, and openly declared their readiness for war. The companions returned to the Prophet ﷺ and confirmed their treachery and betrayal.
The news spread among the Muslims, and the hardship became even more severe. Anxiety and fear overwhelmed them, as the southern side of Medina, where Banu Qurayza were based, was now exposed. What added to their distress was that some women and children were sheltering in the fortresses near the Jews. Allah described those difficult moments in the Qur’an:
“إِذْ جَآءُوكُم مِّن فَوْقِكُمْ وَمِنْ أَسْفَلَ مِنكُمْ وَإِذْ زَاغَتِ ٱلْأَبْصَـٰرُ وَبَلَغَتِ ٱلْقُلُوبُ ٱلْحَنَاجِرَ وَتَظُنُّونَ بِٱللَّهِ ٱلظُّنُونَا۠ “
“˹Remember˺ when they came at you from east and west, when your eyes grew wild ˹in horror˺ and your hearts jumped into your throats, and you entertained ˹conflicting˺ thoughts about Allah.”
Divine Intervention
The siege grew harsher, and the hardship more intense. The Prophet ﷺ supplicated with this prayer:
حَدَّثَنَا سَعِيدُ بْنُ مَنْصُورٍ، حَدَّثَنَا خَالِدُ بْنُ عَبْدِ اللَّهِ، عَنْ إِسْمَاعِيلَ بْنِ أَبِي خَالِدٍ، عَنْ عَبْدِ اللَّهِ بْنِ أَبِي أَوْفَى، قَالَ دَعَا رَسُولُ اللَّهِ صلى الله عليه وسلم عَلَى الأَحْزَابِ فَقَالَ “ اللَّهُمَّ مُنْزِلَ الْكِتَابِ سَرِيعَ الْحِسَابِ اهْزِمِ الأَحْزَابَ اللَّهُمَّ اهْزِمْهُمْ وَزَلْزِلْهُمْ”.
“It is narrated on the authority of Ibn Abu Aufa that the Messenger of Allah (ﷺ) cursed the tribes (who had marched upon Medina with a combined force in 5 H) and said: O Allah, Revealer of the Book, swift in (taking) account, put the tribes to rout. O Lord, defeat them and shake them.”
Allah answered his prayer and brought relief through the conversion of Nu’aym ibn Mas’ud Al-Ghatafani. He offered his help to the Prophet ﷺ, who said, “You are just one man among us, so create division among our enemies, as war is deception.”
Nu’aym went to Banu Qurayza and convinced them to demand hostages from Quraysh to ensure their commitment. Then, he went to Quraysh and told them that Banu Qurayza had regretted breaking the pact with the Prophet ﷺ and planned to hand over the hostages to him as a gesture of reconciliation.
His strategy created distrust among the allies, and their unity collapsed.
Then Allah sent a violent wind that uprooted the disbelievers’ tents, extinguished their fires, and overturned their cooking pots. Allah also sent angels to cast fear into their hearts, as He said:
“يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ ٱذْكُرُوا۟ نِعْمَةَ ٱللَّهِ عَلَيْكُمْ إِذْ جَآءَتْكُمْ جُنُودٌۭ فَأَرْسَلْنَا عَلَيْهِمْ رِيحًۭا وَجُنُودًۭا لَّمْ تَرَوْهَا ۚ وَكَانَ ٱللَّهُ بِمَا تَعْمَلُونَ بَصِيرًا “.
“O believers! Remember Allah’s favour upon you when ˹enemy˺ forces came to ˹besiege˺ you ˹in Medina˺, so We sent against them a ˹bitter˺ wind and forces you could not see. And Allah is All-Seeing of what you do.”
Battle of khandaq Result
The Prophet ﷺ then sent Hudhayfah ibn al-Yaman (may Allah be pleased with him) to gather intelligence on the enemy. There, Hudhayfah witnessed Abu Sufyan calling upon his people to retreat. He hurried back to the Prophet ﷺ with the good news of the disbelievers’ withdrawal.
The Muslims rejoiced immensely, and the Prophet ﷺ praised his Lord, declaring:
“Lā ilāha illā Allāh waḥdah, a‘azza jundah, wa naṣara ‘abdah, wa hazama al-aḥzāba waḥdah”
(There is no god but Allah alone, He strengthened His army, granted victory to His servant, and defeated the confederates by Himself.)
The battle of khandaq Result was nothing short of a divine miracle. The battle of Khandaq story ended in a clear Muslim victory, despite the overwhelming numbers of the enemy forces.
The confederates returned humiliated and defeated, and the true face of the Jews and their deep-seated hatred toward the Muslims was fully exposed.
Conclusion
The battle of Khandaq story is a powerful example of resilience in the face of adversity and unity among Muslims during times of trial.
Despite the siege and betrayal, victory came from Allah, and the coalition armies dispersed without even engaging in full battle.
This battle remains a timeless testimony to the brilliance of prophetic strategy and the greatness of relying upon Allah.
If you want to deepen your understanding of the Prophet’s biography and learn Quran and Hadith from trustworthy sources in a simple and enjoyable way, then join Rahiq Academy today.