The Seven Masjids area in Madinah marks the location of the Battle of the Trench (Khandaq, 5 AH/627 CE) where Nabi and companions defended Madinah against a coalition siege. The small masjids mark shalat stations used during the siege. The most prominent is Masjid al-Fath (Masjid of Victory).
In 5 AH (627 CE), a coalition of Quraysh, Ghatafan, and other tribes — numbering approximately 10,000 — besieged Madinah. On the advice of the companion Salman al-Farsi, Nabi ordered a trench (khandaq) dug along the northern approaches to the city, where it was most vulnerable. The siege lasted approximately a month, during which the Muslims endured extreme cold, hunger, and the fear of betrayal from within. Nabi and his companions maintained shalat stations along the trench line, keeping watch and making doa for divine assistance. These shalat stations became the sites of the seven small masjids that stand in the area today.
The most prominent of the seven is Masjid al-Fath (Masjid of Victory), situated on the highest point of the hill, marking where Nabi made intensive doa for three days seeking divine aid against the siege. Below it are: Masjid Salman al-Farsi (named after the companion who suggested the trench strategy), Masjid Umar ibn al-Khattab, Masjid Ali ibn Abi Talib, Masjid Abu Bakr, and Masjid Fatimah. The seventh masjid, sometimes counted in the group, has varying identifications in different sources. The masjids are small structures — some barely larger than a room — but their historical resonance with the early Muslim community's struggle for survival makes them significant ibadah haji sites.
The Seven Masjids are located on the western slope of Mount Sal'a, approximately 2 kilometers north of Masjid al-Nabawi. They are typically visited together as part of a Madinah ziyarah tour. The area has been developed with walkways, lighting, and explanatory signage. While the masjids are small and some are primarily historical markers rather than active shalat spaces, the area provides a tangible connection to the Battle of the Trench — one of the defining moments of early Islam when the very survival of the Muslim community was at stake. Standing where Nabi made doa for victory, and where victory ultimately came through divine intervention in the form of a devastating wind that scattered the enemy encampment, is a powerful experience.