Seven Mosques (Sab'ah Masajid): The Trench Site of the Battle of Khandaq

Near the western slope of Mount Sala’, northwest of Masjid an-Nabawi, sits a cluster of small historic mosques known as the Seven Mosques, marking the site of the Battle of the Trench (Ghazwat al-Khandaq). This guide covers the history of the battle, the mosques themselves, and how to plan your visit.

Seven Mosques (Sab'ah Masajid): Quick Answer

The Seven Mosques, known in Arabic as Al-Masajid as-Sab’a, are a cluster of small historic mosques near Mount Sala’, northwest of Masjid an-Nabawi in Madina, marking positions connected to the Battle of the Trench fought in the fifth year after the Hijrah (627 CE). Though traditionally called “seven,” sources note the site today generally consists of six mosques, with names and exact details varying somewhat between sources.

The cluster commemorates the defensive strategy used during the battle, along with the companions associated with different positions along the trench.

The Battle of the Trench: History and Significance

Facing a large confederate force of Quraysh and allied tribes advancing on Madina, the Prophet Muhammad ﷺ accepted a defensive strategy proposed by the companion Salman al-Farsi (RA): digging a trench along the exposed side of the city, a tactic not previously used in Arabian warfare. The trench held off the siege, which lasted roughly a month, and the event is referenced in the Qur’an in Surah Al-Ahzab (33:10–11).

The strategy’s success, and the endurance shown by the early Muslim community during the siege, made the Battle of the Trench a significant and frequently referenced moment in early Islamic history.

Want the full battle account and the story of Salman al-Farsi’s strategy? See our dedicated History of the Battle of the Trench guide

The Mosques of the Trench Site

Commonly cited mosques in this cluster include Masjid al-Fath (traditionally the largest, marking a key command position), Masjid Salman al-Farsi, Masjid Ali, Masjid Umar, Masjid Fatima, and Masjid al-Khandaq (the modern mosque marking the trench itself). Sources vary on the complete original list and current count, and some accounts describe an additional mosque, sometimes referenced as a second Masjid Abu Bakr connected to this site specifically, that is no longer standing today.

Want a fuller walkthrough of each mosque and its history? See our dedicated Mosques of the Trench Site guide

Planning Your Visit

For directions and GPS coordinates, see our Location & Directions guide.

Not to Be Confused With Masjid al-Ghamama, Abu Bakr, Ali & Umar

Pilgrims sometimes confuse this cluster with our separate guide covering Masjid al-Ghamama, Masjid Abu Bakr, Masjid Ali, and Masjid Umar near Masjid an-Nabawi. These are two different clusters in two different parts of Madina, connected to different historical events, though some names, particularly Abu Bakr, Ali, and Umar, appear in both due to the companions’ significance across multiple moments in early Islamic history. See our Masjid al-Ghamama, Abu Bakr, Ali & Umar guide → for that separate cluster near Masjid an-Nabawi.

Important Things to Know Before Visiting

Religious & Historical Context

Religious significance

The Battle of the Trench is directly referenced in the Qur’an, giving this site a well-documented religious basis tied to a defining test faced by the early Muslim community.

Historical significance

The trench strategy itself, along with the mosques built to commemorate defensive positions along it, reflects both the military ingenuity and the endurance associated with this period of early Islamic history.

Visitor information

This guide focuses on practical visiting details. Given some variation between historical sources on exact mosque names and counts, pilgrims interested in precise detail should refer to a qualified scholar or historical resource.

Explore More About the Seven Mosques

Frequently Asked Questions

They are a cluster of small historic mosques near Mount Sala’ in Madina, marking positions connected to the Battle of the Trench, fought in the fifth year after the Hijrah.

Traditional accounts describe seven original mosques, but sources indicate the site today generally consists of six, with the additional mosque no longer standing. The name has continued to be used regardless.

No, these appear to be two separate mosques in two different parts of Madina. Our Masjid al-Ghamama, Abu Bakr, Ali & Umar guide covers the mosque near Masjid an-Nabawi specifically.

It was a defensive battle in which the Prophet Muhammad ﷺ and his companions dug a trench around an exposed side of Madina to repel a large confederate force, a strategy proposed by Salman al-Farsi (RA).

It is located near Mount Sala’, northwest of Masjid an-Nabawi in Madina.

Surah Al-Ahzab, verses 10–11, addresses the trial faced by the Muslim community during the siege.

Yes, it pairs reasonably well with Masjid Qiblatain, given its location in a similar part of Madina.

Explore More Holy Ziyarat Guides

Ready to Visit the Seven Mosques?

Holy Ziyarat offers private, reliable transportation to the Seven Mosques and Trench site, easy to combine with Masjid Qiblatain and other Madina Ziyarat sites in the same trip.