At this time, there was growing peace and security in Medina. However, a Jewish tribe called Banu Nadir attempted to invoke a string of indecencies upon Prophet Muhammad (SAW) and the Muslims, leading them to become exiled from the city. This exile angered them and they wanted to find a way to kick the Muslims out of Medina. Seeing that the Quraysh were upset over their battle against the Muslims, in which only hundreds of Muslims were able to overcome an army of thousands and a win could only be snatched from the Muslims through a sneaky attack, the Jews offered them a more promising opportunity to fight against the Muslims by promising them resources and their full support. The Quraysh seized this chance to redeem themselves, and they and the Jews set out to gather an even greater army to fight against the Prophet (SAW) and the believers.
They ended up gathering an army of ten thousand confederates, outnumbering not only the Muslim fighters but the Muslims altogether, including women and children. When news reached the Prophet (SAW) of these forces, he met with his Companions (RAA) to come up with a plan to defend Medina. One of the Companions, Salman al-Farisi (RAA) , proposed that the Muslims dig a large trench on the north side of the city, since the other sides were surrounded by mountains and trees, thereby fully protecting it from forthcoming soldiers. Prophet Muhammad (SAW) agreed, and together, led by the Prophet’s (SAW) reminders of their rewards in the hereafter, the Muslims started digging. Each group of ten Muslims was allocated 40 yards of soil to dig. Despite their severe hunger, the Muslims were determined to reach their objective and remained in the constant reminder of the Prophet’s (SAW) promises.
One famous example of the many miracles that occurred during this day was when the Muslims came upon a boulder while they were digging that would be an obstacle to making the ditch. None of them were able to break it up with their spades, so they went to Prophet Muhammad (SAW) for advice. The Prophet (SAW) lifted his spade and struck down on the rock, and in an instant it transformed into a loose sand dune. In another version, Al-Bara’ said:
On Al-Khandaq (the trench) Day there stood out a rock too immune for our spades to break up. We therefore went to see the Messenger of Allâh [pbuh] for advice. He took the spade, and struck the rock uttering “in the Name of Allâh, Allâh is Great, the keys of Ash-Shâm (Geographical Syria) are mine, I swear by Allâh, I can see its palaces at the moment;” on the second strike he said: “Allâh is Great, Persia is mine, I swear by Allâh, I can now see the white palace of Madain;” and for the third time he struck the rock, which turned into very small pieces, he said: “Allâh is Great, I have been given the keys of Yemen, I swear by Allâh, I can see the gates of San‘a while I am in my place.”
Within six days, the trench was complete. When the 10,000 confederates began to attack, they were met by 3,000 Muslims and the trench between them. They tried to find some weak spots to transcend the trench and break through to Medina, but the trench proved too formidable for their horses and camels. They engaged in a few skirmishes along the trench but didn’t engage in any full-on combat. A number of the conferderates were deployed, led by ‘Amr bin ‘Abd-e-Wudd, to fight through the trench; they ended up capturing a marshy land between the trench and Sila’ Mountain. Amr challenged the Muslims to a duel, and Ali bin Abi Talib was sent to fight him. Ali killed Amr, and as a result the remaining fighters panicked and fled the area. There were a number of attempts after this to break through the trench once again, but the Muslims resolutely confronted each one so that none of them were successful.
Seeing that they were suffering, the confederates realized that they needed a new tactic in order to reach the Muslims. Huyai, a leader in the Bani Nadir tribe, approached Banu Qurayza, another Jewish tribe, for help. The Banu Qurayza had already made a pact with Prophet Muhammad (SAW), and not only were they neutral in the conflict, but they also provided the Muslims resources for digging the trench. Huyai wanted the Banu Qurayza to attack from the South of Medina, as it was the only chance of getting into the city, and as a result the Muslims would be attacked from both sides. The Banu Qurayza were hesitant at first, but after Huyai’s evil manipulation, they were persuaded to betray the Prophet (SAW) and the Muslims and agreed to help the Bani Nadir in their siege.
The Banu Qurayza began to launch war operations against the Muslims and started to approach the secluded housing of the Muslim women and children. When news reached Prophet Muhammad (SAW) of this, he was shocked of their betrayal and the Muslims immediately realized their frightening situation – they were vulnerable to attack from the south by the Banu Qurayza, with no way to break through the confederates’ army in the North, and in the center the women and children were unprotected.
“And when the eyes grew wild and the hearts reached to the throats, and you were harbouring doubts about Allâh. There, the believers were tried and shaken with a mighty shaking.”
[Al-Qur’an 33:10, 11]
The Muslims’ morale began to sink as hopelessness took over their minds. They began to realize that their small number was of no match to the growing forces around them and began to lose faith that they could stand against them. Fear was rampant among them, as they didn’t know what to do and had no solution for this situation. The Prophet (SAW) , seeing the terrible position they were in, began to feel anxious. So, he turned to Allah (SWT) for guidance. While pondering the situation, he remembered Allah’s (SWT) promise of victory, and had growing faith that Allah (SWT) would protect him and the Muslims. He was overcome with hope and rose to his feet saying, ““Allâh is Great. Hearken you Muslims, to Allâh’s good tidings of victory and support.”
Then, he immediately began to take action. His foremost priority to protect the women and children, so he sent some fighters to them in order to protect from any surprise attacks by the enemy. Prophet Muhammad (SAW) wanted to stop the Ghatafan from fighting, so he offered them one-third of Medina’s date produce if they halted. The Ghatafan agreed, but before Prophet Muhammad (SAW) solidified the agreement, he consulted his Companions. They rejected the agreement, saying that Medina had never before lowered itself to such a weak position and the Ghatafan would prefer killing all the Muslims if they could, so it was better to stand against them.
At this point, Allah (SWT) had blessed a man from the confederates named Nuaym ibn Masud, an elder highly respected by the enemies. He secretly became a Muslim, and came to Prophet Muhammad (SAW) to offer his service to the Muslims’ benefit. Prophet Muhammad (SAW) asked him to create distrust and suspicion between the confederates and the Banu Qurayza to divide them. So, Nuaym went to the Banu Qurayza and instilled in them the idea that if the siege failed, the confederates would likely abandon them and leave them to the Prophet’s (SAW) mercy. He told them that if they would like to ensure that the confederates don’t abandon them, they should ask for the confederates to offer some of their leaders as hostages. Then, Nuaym went to Abu Safyan, leader of the confederates, and gave him the idea that the Banu Qurayza once again sided with Prophet Muhammad (SAW) . He told Abu Safyan that they should never surrender any hostages to them, because they’d give the hostages to Prophet Muhammad (SAW) .
When the two forces were ready to side with each other in a fight against Prophet Muhammad (SAW) , the confederates sent a message to the Banu Qurayza to signal a united attack. The Banu Qurayza, however, remembered Nuaym’s words and demanded that the confederates give them a hostage to ensure that they would remain in loyalty with them. In response, the confederates obviously refused such a demand, suspicious that the hostages would be given to the Muslims… and in this way, an atmosphere of distrust and suspicion arose between the two forces, disrupting their evil plans against the Muslims.
Prophet Muhammad (SAW) then prayed to Allah (SWT) to defeat the confederates once and for all and restore the safety and security of the Muslims. The Prophet (SAW) said,
“Oh, Allâh! You are quick in account, You are the sender of the Book, we beseech You to defeat the confederates.” [Sahih Al-Bukhari 1/411,2/590]
Allah (SWT) answered His Messenger’s prayers, and sent down terrible winds and harsh storms upon the disbelievers’ army. Their shelters blew away, their resources were scattered, and the fighters were worn down. Soon, they gave up, and news reached Prophet Muhammad (SAW) that they were leaving.
Allah (SWT) fulfilled his promise to His Messenger and His believers by sparing them from fighting such a dangerous and imposing army and inflicting a major blow on the confederates. The Battle of Khandaq, one of the earliest decisive victories of the Muslims, proved to the world that no force was strong enough to overcome the growing strength of Islam.