On the western slope of Mount Sela’, where the ground falls away towards the old trench line, stands a row of small stone mosques that most visitors almost walk past.
These are the Seven Mosques of Madinah — Al-Masajid as-Sab’ah, or Saba Masajid — each one marking the spot where the Prophet Muhammad ﷺ or one of his closest Companions was posted during the siege of the Battle of the Trench in 5 AH.
They are the most concentrated piece of Seerah geography in Madinah: six little mosques within a few minutes’ walk, and a story that needs all of them to be told. This guide names each mosque, explains the famous puzzle of why “seven” mosques are six, and shows how to visit.
| Quick Facts — The Seven Mosques | |
|---|---|
| Location | Western slope of Mount Sela’, north-west Madinah, at the Battle of the Trench site |
| Distance from Masjid al-Nabawi | About 3–5 km west/north-west — around 10 minutes by car |
| The mosques | Al-Fath · Salman al-Farsi · Abu Bakr · Umar ibn al-Khattab · Ali ibn Abi Talib · Fatimah az-Zahra |
| Historical link | The Battle of the Trench (Ghazwat al-Khandaq), 5 AH / 627 CE |
| Also at the site | Masjid al-Khandaq — the large modern congregational mosque below the slope |
| Entry | Free — the small mosques are viewed mostly from outside; Masjid al-Khandaq is open for prayer |
Why Are There Seven Mosques on One Hillside?
In Shawwal 5 AH, an alliance of some ten thousand men — Quraysh, Ghatafan and their allies — camped north of Madinah, facing the trench the Muslims had dug on the advice of Salman al-Farsi (RA). The Muslim command post stood on the slope of Mount Sela’, behind the line.
In later centuries, the people of Madinah marked the remembered positions of that camp with small mosques: where the Prophet ﷺ had his tent and prayed, where Salman kept his post, where Abu Bakr, Umar and Ali were stationed.
The buildings themselves are not from the Prophet’s ﷺ time — they were raised and rebuilt by later generations — but the ground is the ground of the siege, and the names preserve the map of the camp.
Read our account of the Battle of the Trench first, and the hillside reads like a diagram of the battle.

The Six Mosques, One by One
Masjid al-Fath — the largest of the group, set highest on the rise at the top of the steps.
This is the heart of the site: tradition holds that here the Prophet ﷺ supplicated against the confederates for three days during the siege, until he was given the glad tidings of victory — hence “Al-Fath”, the Victory. It is also called Masjid al-Ahzab and Masjid al-A’la.
Masjid Salman al-Farsi — a small mosque about twenty metres below Al-Fath, named for the Persian Companion whose idea the trench was. Of all the names here, his is the one the battle could not have happened without.
Masjid Abu Bakr as-Siddiq — a few paces from Salman’s, the smallest of the row, marking the post of the first caliph.
Masjid Umar ibn al-Khattab — just south and slightly higher, named for the second caliph.
Masjid Ali ibn Abi Talib — standing a little apart on its own knoll to the south. Ali’s (RA) name is bound to this battle by his famous duel with the champion Amr ibn Abd Wudd, who had crossed the trench.
Masjid Fatimah az-Zahra — the smallest of all, named for the Prophet’s ﷺ daughter; on some lists it is given as the mosque of Sa’d ibn Mu’adh (RA), the chief of the Aws, whose judgement after the siege is part of the Trench story.
Below the slope stands Masjid al-Khandaq, the large modern mosque where today’s congregational prayers at the site are held — most visitors pray there, then climb the steps to walk the row of small mosques above.
So Why “Seven” Mosques, When There Are Six?
Every visitor asks, and the honest answer is that the count was never exact. Only six small mosques stand on the slope.
The traditional seventh varies by guide and by century: older Madinah guides counted Masjid Qiblatain — visited on the same outing, a short drive north-west — to make the seven; others count the large Masjid al-Khandaq below; others still name a seventh small mosque, of Sa’d ibn Mu’adh, that once stood among them.
The name “Seven Mosques” is simply older than the present count. What matters is not the arithmetic but the cluster: no other spot in Madinah packs so many named positions of the Prophet ﷺ and his Companions into a hundred metres of hillside.

Visiting the Seven Mosques
The site lies west of the city centre at the foot of Mount Sela’, about ten minutes by taxi from the Haram, and is a standard stop on the round in our Ziyarat in Madinah guide — usually paired with Qiblatain, which is minutes away.
Allow thirty to forty-five minutes: pray in Masjid al-Khandaq if it is a prayer time, then take the steps up to Al-Fath and walk down the row.
The small mosques are generally seen from outside — some open at prayer times — and there is no prescribed ritual attached to them; the visit is one of knowledge and remembrance.
Go in the morning for the clearest light on the slope, carry water in summer, and read the Trench story before you climb: the little mosques mean little without it, and everything with it.
Related Guides
- Masjid Quba: The First Mosque in Islam and the Umrah Reward
- Mount Uhud: The Mountain That Loves Us — Battle, Martyrs and Visitor Guide
- Badr: The Battlefield of Islam’s First Great Victory
Frequently Asked Questions
What are the Seven Mosques in Madinah?
The Seven Mosques (Al-Masajid as-Sab’ah) are a cluster of small historic mosques on the slope of Mount Sela’ in north-west Madinah, at the site of the Battle of the Trench. They are named Al-Fath, Salman al-Farsi, Abu Bakr, Umar ibn al-Khattab, Ali ibn Abi Talib and Fatimah az-Zahra, after the positions those figures held during the siege of 5 AH.
Why are they called the Seven Mosques if only six remain?
The name is older than the present buildings. Six small mosques stand on the slope today; the seventh has traditionally been counted in different ways — by adding Masjid Qiblatain (visited on the same round), or the large Masjid al-Khandaq below the slope, or a small mosque of Sa’d ibn Mu’adh that once stood with the others.
Which is the most important of the Seven Mosques?
Masjid al-Fath, the largest, set highest on the slope. Tradition holds that the Prophet ﷺ prayed and supplicated here for three days during the siege of the Trench, until he received the news of victory — which is why it is called Al-Fath, “the Victory”.
Can you pray in the Seven Mosques?
The large Masjid al-Khandaq at the foot of the slope is a working mosque open for the five prayers. The six small mosques on the slope are mainly viewed from outside, though some open around prayer times. No specific prayer is prescribed for them — the visit is for remembrance and learning.
How far are the Seven Mosques from Masjid al-Nabawi?
About 3–5 km west/north-west of the Prophet’s Mosque, at the foot of Mount Sela’ — roughly ten minutes by taxi. Most ziyarat tours combine them with Masjid Qiblatain, which is only a few minutes further.

One thought on “The Seven Mosques of Madinah: Al-Masajid as-Sab’ah Explained”