Battle of Trench year was 627


The Battle of Khandaq, or the Battle of the Trench, was a significant event in Islamic history that took place in 627 CE the fifth year of Hijri. The Muslim community in Medina was under siege for a month by the Pagan Quraysh of Mecca. This remarkable chapter stands as a testament to the strength and resilience of the early Muslims.

In the face of imminent invasion, the Prophet Muhammad and his companions displayed remarkable strategic acumen. They devised a brilliant defensive plan that would not only test their faith, resilience, and unity, but also mark a crucial turning point in the early Islamic era.

The battle was fought against the combined forces of the Quraysh and their allies, creating a formidable challenge that the Muslims confronted head-on. The Muslims dug a trench around Medina to protect themselves, and they also used psychological warfare to demoralize the enemy. In the end, the Muslims emerged victorious, and the Battle of Khandaq is considered to be one of the most important battles in Islamic history.

The Trench: A Symbol of Protection and Unity

To protect Medina from the impending invasion, the Prophet Muhammad devised a masterful plan – the construction of a trench. The trench, strategically positioned around the vulnerable parts of the city, served as a physical barrier and symbol of unity.

It stretched across the northern and southern regions, taking advantage of the natural protection provided by the surrounding hills. This landmark decision demonstrated the Prophet’s strategic brilliance and instilled a sense of determination and unity among the Muslims.

Anecdote of Salman al-Farsi

During the Battle of Khandaq, an anecdote highlights the remarkable ingenuity of Salman al-Farsi, a Persian companion of the Prophet Muhammad. Recognizing the enemy’s ignorance of trench warfare, Salman suggested digging the trench deeper in a specific location where the Quraysh forces were weakest.

This tactical maneuver caught the enemy off guard and successfully thwarted their attempt to breach the defensive line. It showcased the strategic acumen and resourcefulness of the Muslim army, and further solidified the importance of Salman’s role in the battle.

The Formation of the Trench

The trench, approximately six kilometers long, provided a formidable barrier against the advancing enemy forces, restricting their mobility and protecting the Muslim community.

During the Battle of Khandaq, there is an inspiring anecdote involving the Prophet Muhammad. While the Muslims were digging the trench, they encountered a particularly large and stubborn rock that was difficult to break.

The Prophet Muhammad took the initiative and struck the rock three times with his pickaxe, each time invoking the name of Allah and saying, “Allahu Akbar” (Allah is the Greatest). Miraculously, with each strike, the rock shattered into pieces, making way for the construction of the trench.


The Battle of Khandaq took place during a critical period of hostility between the Muslims of Medina and the Quraysh of Mecca. Seeking to crush the rising influence of Islam, the Quraysh formed an alliance with various tribes, including the Ghatafan and Banu Nadir. This alliance amassed a force of around 10,000 soldiers, significantly outnumbering the Muslims who had approximately 3,000 defenders.

The Banu Qurayza’s Support

In a remarkable show of solidarity, the Banu Qurayza, a Jewish tribe residing in Medina, provided assistance to the Muslims during the battle. They lent equipment for the digging of the trench, further strengthening the defensive fortifications. This support played a crucial role in the success of the Muslims’ defensive strategy.

The Siege Begins

As the Quraysh-led coalition reached Medina, they were confronted with the unexpected obstacle of the trench. Frustration and confusion gripped their ranks, as their initial plans were thwarted. The siege commenced, and the Muslims endured weeks of tension, scarcity of provisions, and extreme weather conditions.

The Test of Faith and Perseverance

Amidst the hardships of the siege, the Muslim community demonstrated unwavering faith and perseverance. United in their commitment to Islam, they found solace and strength in their collective spirit. Despite the scarcity of resources and the harsh conditions, their resolve remained unbroken.

The Brilliance of Strategy

While the Muslims endured the trials of the siege, the Quraysh coalition faced internal divisions and dissension among their ranks. Recognizing this weakness, the Prophet Muhammad skillfully employed diplomatic strategies, forging alliances with the Jewish tribe of Banu Qurayza. This further weakened the enemy’s morale and disrupted their unity.

Leaders and Heroes

The Quraysh coalition was led by prominent figures such as Abu Sufyan, Hind bint Utbah, Ikrimah bin Abu Jahl, and Amr ibn al-As. On the Muslim side, the Prophet Muhammad provided strategic guidance, while brave and notable heroes emerged, including Ali ibn Abi Talib, Sa’ad ibn Mu’adh, and Salman al-Farsi.

Also Read- The Battle of Hunayn and the Rise of Islam

The Turning Point

The Battle of Khandaq witnessed a critical turning point when Ali ibn Abi Talib and his companions, inspired by divine guidance, launched a surprise counterattack against the enemy camp. Ali crossed the trench and killed the enemy’s champion, Amr ibn Abd al-Wud, in a duel. This sudden assault struck fear into the hearts of the besiegers, causing disarray and eventually leading to their retreat.

The turning point was also influenced by a storm that Allah sent to disrupt the enemy’s camp and by the treachery of the Jewish tribe of Banu Qurayza, who broke their pact with the Muslims and sided with the Quraysh. The Prophet Muhammad learned of their betrayal and sent a force to besiege them, which further weakened the enemy’s resolve. It marked a significant shift in momentum and ultimately led to the defense of Medina.

One of these events was the treachery of the Jewish tribe known as Banu Qurayza. They had previously formed a treaty with the Muslims but were persuaded by Huyay ibn Ahtab, the leader of the expelled Banu Nadir tribe, to betray their agreement and join the enemies of Muhammad.

As a result, the enemy forces struggled to maintain their morale and were unfamiliar with the trench warfare tactics employed by the Muslims. The storm became a turning point, hindering their progress and ultimately forcing them to withdraw.

Victory and Lessons Learned

The Battle of Trench culminated in a resounding victory for the Muslims. Their unity, faith, and innovative defensive strategy had prevailed against overwhelming odds. This triumph highlighted the power of strategic planning, unwavering determination, and the strength derived from unyielding belief.

Legacy and Inspiration

The Battle of Trench left an indelible mark on the history of Islam, serving as a testament to the courage and resilience of the early Muslims. It continues to inspire generations, reminding them of the extraordinary feats that can be achieved when valor and strategy unite in the face of adversity.


The Battle of Trench stands as an enduring testament to the power of faith, strategic thinking, and the unyielding spirit of the human will. This historic clash, which took place in the month of Sha’ban in 5 AH, showcased the remarkable ingenuity and bravery of the early Muslims who defended their community against overwhelming odds.

The Battle of Trench serves as an eternal reminder of the remarkable achievements that can be attained when valor and strategy converge to withstand the storm of challenges.