The Seven Mosques, known in Arabic as al-Masajid al-Sab‘ah, are a group of small mosques at the western foot of Jabal Sal‘ in Madinah. They stand in the area where the Muslims dug a trench to defend the city in the Battle of al-Khandaq, in the fifth year after the Hijrah.
The name is traditional: the number counted has varied over time, and only some of the original buildings remain. Today the site is a peaceful stop on most Madinah tours.

The Seven Mosques and the Battle of the Trench
In 5 AH, a coalition of Quraysh and allied tribes marched on Madinah with an army far larger than the Muslims could meet in the open. According to the Seerah, Salman al-Farisi suggested digging a trench across the open northern approach. The Prophet ﷺ worked alongside his Companions, carrying earth until dust covered his skin (al-Bukhari, from al-Bara’), and he struck a great rock that they could not break (al-Bukhari, from Jabir).
The siege lasted for weeks in cold and hunger. Allah describes it in Surah al-Ahzab: “when they came at you from above you and from below you, and when eyes shifted and hearts reached the throats” (Qur’an 33:10). Then Allah sent a fierce wind and unseen forces, and the confederates withdrew.
Masjid al-Fath and the dua
The largest of the old mosques, Masjid al-Fath, sits on a rise of Jabal Sal‘. A report from Jabir in Musnad Ahmad and al-Bukhari’s al-Adab al-Mufrad says the Prophet ﷺ made dua there on Monday, Tuesday and Wednesday, and was answered on Wednesday between the two prayers. Scholars differ on its grading, and those who accept it mostly take from it the value of that time for dua, not a special virtue of the place.
What you will see at the Seven Mosques
The remaining historic mosques are small, simple stone buildings bearing the names of Companions: Masjid al-Fath, Masjid Salman al-Farisi, Masjid Abu Bakr, Masjid ‘Umar and Masjid ‘Ali, among others. Their names reflect tradition about where these Companions were stationed; this is not confirmed by authentic hadith. Several of the historic mosques have closed, and the large modern Masjid al-Khandaq nearby now serves worshippers.
How to visit the Seven Mosques
The area is about 3 to 4 km north-west of Masjid an-Nabawi, roughly 10 minutes by taxi, and close to Masjid al-Qiblatayn. Most half-day tours stop for 20 to 30 minutes. Mornings are best. The small mosques may be closed outside prayer times, but the area can be walked around and the modern mosque is open for prayers. Masjid al-Fath involves a short climb up steps.
Seven Mosques etiquette: what is from the Sunnah
Practical tips
Pair with Qiblatayn
The two sites are a few minutes apart by car.
Read al-Ahzab
Verses 9–27 describe the siege and its outcome.
Wear good shoes
The steps to Masjid al-Fath are uneven.
Seven Mosques quick facts
| City | Madinah (al-Khandaq area) |
|---|---|
| Distance | About 3–4 km north-west of Masjid an-Nabawi |
| Time needed | 20–30 minutes |
| Best time | Morning |
| Difficulty | Easy; short climb to Masjid al-Fath |
| Open to visitors | Area open; small mosques often closed outside prayer times |
The Seven Mosques
About 3–4 km north-west of Masjid an-Nabawi
Open in Google MapsNearby ziyarat- Saqifah Bani Sa‘idah1.6 km
- Masjid al-Ghamamah1.7 km
- Masjid Abu Bakr1.7 km
- Masjid Umar1.7 km
Combine the trench site with Masjid al-Qiblatayn in the ziyarat route planner. Our Madinah ziyarat guide covers the Prophet’s ﷺ mosque, and the ziyarat hub lists all sites.
Seven Mosques: frequently asked questions
Why are they called the Seven Mosques if fewer remain?
The name is traditional. The number counted has varied, and several buildings have closed or been replaced.
Should I pray in each mosque?
No. Praying in each in turn as a ritual is not from the Sunnah.
Who suggested the trench?
The Seerah sources report that Salman al-Farisi suggested it, based on Persian practice.
Is Masjid al-Fath a special place for dua?
A report links it with the Prophet’s ﷺ dua during the siege, but scholars differ on its grading and most do not give the place itself a special virtue.
Planning your days in Madinah? Our Madinah city guide has live prayer times, the weather, the local time and every ziyarah in the city on one page.
See Madinah’s history with a guide
We arrange half-day Madinah ziyarat tours that tell the story accurately and respectfully.
