Historic site
The Seven Mosques of the Trench (al-Masajid as-Sab'a)
A group of mosques at the foot of Mount Sal', commemorating places where the Prophet ﷺ and his Companions prayed during the defence of Madinah in the Battle of the Trench (5 AH, 627 CE).

History
In 5 AH (627 CE) the Quraysh and their allies besieged Madinah. On the advice of Salman al-Farisi, the Muslims dug a trench across the open side of the city. The siege lasted about a month; the Quran describes the event in Surah al-Ahzab (33:9–27).
According to sira accounts, the Prophet ﷺ and his Companions prayed and made supplication at various places around Mount Sal' during the siege. These places were later marked as mosques. The names and number vary between traditions; they are commonly counted as seven and are associated with figures such as Ali, Abu Bakr, Umar, Fatimah and Salman.
The present buildings have been renewed and maintained over time. The exact attribution of each spot to an individual event varies between sources.
Visiting tips
The mosques are north of central Madinah at the foot of Mount Sal' and can be reached by taxi. Visits are generally during the day; hours may vary with local arrangements.
Walking between the mosques involves open ground. In hot months choose the early morning. Facilities may be limited, so bring water and a parasol.
Etiquette
Those who wish to pray should follow the order of the rows and not disturb other visitors. Some narrations about special merits of these mosques are considered weak by scholars, so do not present such claims as certain.
Be respectful when photographing historic places and avoid loud conversation.
Timeline
5 AH / 627 CE
Battle of the Trench (al-Ahzab)
The Quraysh and their allies besieged Madinah for about a month; the Muslims dug a trench on the open side of the city.
Location
Sources
- Quran 33:9-27
- Ibn Hisham, al-Sira al-Nabawiyya
- Ibn Sa'd, al-Tabaqat al-Kubra
- al-Samhudi, Wafa al-Wafa bi-Akhbar Dar al-Mustafa