Battle of Trench of Medina with Meccans laying seige on yasthrib and the trench being a defense. Tribes,mosques,castles,roads,valleys,mountains and lava fields as well as enemy movements have been depicted.
Battle of Trench of Medina with Meccans laying seige on yasthrib and the trench being a defense. Tribes,mosques,castles,roads,valleys,mountains and lava fields as well as enemy movements have been depicted. — Photo: DrZubairRashid | CC BY-SA 4.0

Battle of the Trench

Campaigns led by Muhammad627620s conflictsMuhammad in MedinaMilitary history
4 min read

An army of perhaps ten thousand men was marching on Medina, and the city's defenders numbered a third of that. The Quraysh of Mecca had spent years trying to crush the young Muslim community; now they had gathered allied tribes from across Arabia for a final blow. Then a man named Salman, a Persian convert who had seen siege warfare in his homeland, offered an idea the Arabs had never used in battle: dig a trench. In the winter of 627 the people of Medina took up shovels, and the ditch they cut into the earth would decide the campaign without the great clash everyone expected.

A City Under Threat

The roots of the confrontation ran back through two earlier battles, Badr in 624 and Uhud in 625, in the long conflict between Muhammad's followers and the Meccan Quraysh. By 627 the Quraysh, primarily merchants rather than soldiers, knew they could not finish the war alone. They negotiated with the Bedouin tribes of the desert and with the Banu Nadir, a group Muhammad had earlier expelled from Medina, who helped raise allies by offering them a share of their date harvest. The resulting coalition, the "Confederates," drew in the Ghatafan, the Sulaym, and others, swelling to a reported seven and a half to ten thousand fighters. Against them, Medina could field roughly three thousand. Word of the advancing host reached the city through riders of the Banu Khuza'a, giving the defenders only days to prepare.

The Trench

Medina sat ringed on most sides by rocky ground and dense palm groves, terrain that cavalry could not easily cross. Only the northern approach lay open. On Salman's advice, Muhammad set the whole community to digging a trench across that vulnerable flank, and the reports describe the Prophet himself working alongside everyone else, hauling earth in the cold. The labor took roughly six days. The word for the ditch, khandaq, came from the Middle Persian kandag, "that which has been dug," and it gave the battle its name. When the Confederate army arrived and saw the obstacle, they were baffled. Arab warfare turned on cavalry charges and open combat, and here was a gash in the ground their horses could not leap. The great assault they had planned simply stalled at the trench's edge.

A Siege That Unraveled

What followed was less a battle than a test of nerve. For about three weeks the armies faced each other across the ditch while skirmishers traded arrows and the occasional rider tried to find a crossing. Inside the city the strain mounted: food ran short, the nights grew bitterly cold, and exhaustion frayed the defenders. Muhammad worked the other front as well, opening secret talks with the Ghatafan to sow distrust among the allied camps and weaken their unity. The Confederates, unable to break through and increasingly divided, found their campaign collapsing under its own weight. When a spell of fierce wind and cold weather swept the plain, scattering tents and cooking fires, the coalition lost heart and withdrew. The casualties on both sides numbered only a handful.

What the Trench Decided

The siege's failure marked a turning point. The Quraysh had thrown their largest coalition against Medina and achieved nothing, and the effort cost them prestige and their trade routes toward Syria. The balance of power in the Hijaz began to shift toward the Muslim community. The battle's grim aftermath, the siege and harsh punishment of the Banu Qurayza tribe accused of betraying the city's pact, remains a sober and much-debated chapter that historians weigh carefully alongside the rest. Today the northern reaches of Medina, where the ditch once ran, are woven into the modern city, and a cluster of small historic mosques nearby recalls the days when an unfamiliar idea, borrowed from a faraway land, turned back an army many times its defenders' size.

From the Air

The Battle of the Trench was fought along the northern edge of early Medina, near 24.467 degrees north, 39.600 degrees east, in what is now part of the built-up city. The exact line of the trench is not preserved, but the area sits within the sacred district that non-Muslims may not enter, so it is best viewed respectfully from altitude or a distance. From the air, central Medina appears as a dense urban core wrapped by ring roads, with the green-domed Prophet's Mosque as the unmistakable landmark to the south of the historic battlefield. The Seven Mosques area, associated with the battle, lies to the west. Nearest airport: Prince Mohammad bin Abdulaziz International (ICAO OEMA), about 15 km to the northeast. Clear, dry skies prevail for most of the year, giving excellent visibility over the Hejaz highlands.

Nearby Stories