The Seven Mosques, known in Arabic as Al-Masajid al-Sab‘a, form one of the most historically significant Islamic landmarks in Madinah. Situated on the western side of Mount Sela, this mosque complex marks the precise locations where the Prophet Muhammad ﷺ and his companions established defensive positions during the Battle of the Trench (Ghazwat al-Khandaq)—a defining moment in early Islamic history.
Although commonly called “seven,” the site today consists of six small historic mosques. The seventh mosque is traditionally identified from nearby locations associated with the same battle, forming a complete spiritual and historical Ziyarat circuit frequently visited by Umrah and Hajj pilgrims.
Where Are the Seven Mosques Located?

The mosques are located northwest of Masjid an-Nabawi, at the foothills of Mount Sela in Madinah. This area once served as the northern defensive line of the city and directly overlooks the location where the trench was dug to protect Madinah from a massive allied force.
Due to their proximity to other Ziyarat landmarks, the Seven Mosques are usually visited alongside places such as Masjid Qiblatayn, Mount Uhud, and Masjid Quba, making them an essential stop in any Madinah Ziyarat itinerary.
The Seven Mosques Historical – The Battle of the Trench (5 AH / 627 CE)
In the fifth year after Hijrah, a confederation of Quraysh and allied tribes—numbering nearly 10,000 warriors—advanced toward Madinah with the intention of eliminating the Muslim community. Facing overwhelming odds, the Prophet ﷺ accepted an innovative defensive strategy proposed by Salman al-Farsi: digging a trench along the exposed side of the city.
This method was unknown in Arabian warfare. The Muslims dug a trench several kilometers long under extreme hardship, hunger, and cold. The Prophet ﷺ personally participated in the labor, strengthening morale and demonstrating leadership by example.
The siege lasted nearly a month. The Qur’an vividly describes this trial in Surah Al-Ahzab (33:10–11), portraying the fear and testing faced by the believers. Ultimately, the battle ended without a direct assault. A powerful windstorm, sent by Allah, destroyed the enemy camps, forcing the confederates to retreat in humiliation. This decisive moment permanently shifted the balance of power in Arabia.
Why Are They Called “The Seven Mosques”?
Historically, scholars agree that six mosques were constructed at the exact command posts of the Prophet ﷺ and his companions during the siege. The term “Seven Mosques” emerged from later traditions that included an additional nearby mosque associated with the same battle, most commonly Masjid al-Rayah.
Thus, the name reflects historical memory rather than architectural count, and pilgrims traditionally complete the “seven” by visiting nearby related sites.
The Six Mosques of the Seven Mosques Complex

Masjid al-Fath (Mosque of Victory)
The largest and most prominent mosque, Masjid al-Fath, stands on elevated ground where the Prophet ﷺ established his command center. From this location, he supervised the defense and made heartfelt supplications for divine help. The name “Al-Fath” commemorates the victory granted by Allah without a conventional battle. Standing here offers visitors a powerful reminder of reliance on Allah during the most difficult trials.
Masjid Salman al-Farsi
This mosque honors Salman al-Farsi, whose strategic insight saved Madinah. His proposal to dig the trench demonstrates the Islamic principle of combining faith with practical wisdom. The modest structure reflects humility and the universal nature of Islam, transcending ethnicity and origin.
Masjid Abu Bakr As-Siddiq
Dedicated to the Prophet’s closest companion and the first Caliph, this mosque marks Abu Bakr’s defensive station. His unwavering support, calm leadership, and absolute faith earned him the title As-Siddiq. The simplicity of the mosque mirrors his well-known humility and devotion.
Masjid Umar ibn al-Khattab
This mosque commemorates Umar ibn al-Khattab, the second Caliph, known for strength, discipline, and justice. Positioned at a critical defensive point, Umar maintained order and morale throughout the siege. The mosque symbolizes firmness grounded in faith and responsibility.
Masjid Ali ibn Abi Talib
Associated with Ali ibn Abi Talib, the Prophet’s cousin and son-in-law, this mosque represents courage and sacrifice. Ali’s bravery during the Battle of the Trench inspired the believers at a moment of extreme pressure, reinforcing the importance of steadfastness in defense of truth.
Masjid Sa‘d ibn Mu‘adh
This mosque honors Sa‘d ibn Mu‘adh, leader of the Aws tribe and a pillar of the Ansar. Wounded during the battle, he later passed away, and authentic narrations state that the Throne of Allah shook at his death. His legacy reflects loyalty, leadership, and sacrifice for Islam.
The Probable Seventh Mosque
The strongest historical candidate for the seventh mosque is Masjid al-Rayah (Mosque of the Banner), located north of Mount Sela. This is where the Prophet ﷺ initially raised the banner and began trench operations. Other scholars also mention Masjid Qiblatayn or Masjid Bani Haram, but Masjid al-Rayah remains the most contextually aligned with the Battle of the Trench.
Visiting the Seven Mosques Today
The Seven Mosques are open to visitors year-round. Early morning and late afternoon are ideal times, especially in warmer months. Some smaller mosques may not always be open internally, but the entire area remains accessible for reflection and prayer.
Pilgrims often visit the site as part of guided Ziyarat tours. For those performing Umrah or visiting Madinah independently, traveling by private taxi is the most convenient option, especially when combining multiple Ziyarat locations in one trip. Reliable Umrah and Ziyarat transport services allow families and groups to move comfortably between Masjid an-Nabawi, the Seven Mosques, Mount Uhud, and Masjid Quba without time pressure, making the spiritual journey smoother and more meaningful.
Spiritual Lessons from the Seven Mosques
The Seven Mosques are not merely historical structures; they represent living lessons of faith, strategy, patience, unity, and divine reliance. Each mosque reflects a unique quality embodied by the Prophet ﷺ and his companions—wisdom, loyalty, justice, courage, and sacrifice. Visiting this site allows believers to connect physically and spiritually with a moment when Islam stood firm against overwhelming odds.
FAQs
What are the seven mosques in Madinah?
They include Masjid al-Fath, Salman al-Farsi, Abu Bakr As-Siddiq, Umar ibn al-Khattab, Ali ibn Abi Talib, Sa‘d ibn Mu‘adh, and traditionally Masjid al-Rayah.
What is Masjid Sab‘ah?
Masjid Sab‘ah is another name for the Seven Mosques complex in Madinah, linked to the Battle of the Trench.
What is Shuhada Uhud?
Shuhada Uhud refers to the martyrs of the Battle of Uhud, buried near Mount Uhud, another key Ziyarat site in Madinah.
What are the three largest mosques in the world?
Masjid al-Haram in Makkah, Masjid an-Nabawi in Madinah, and Masjid Hassan II in Casablanca are among the largest.
Conclusion
The Seven Mosques of Madinah stand as a timeless testimony to one of Islam’s most critical moments. Rooted in the Battle of the Trench, they preserve the legacy of the Prophet Muhammad ﷺ and his companions—men who combined deep faith with strategic wisdom and unwavering unity. For pilgrims, historians, and students of Islam, visiting the Seven Mosques is not simply a tour but a journey into resilience, divine support, and spiritual strength. Including this sacred site in your Madinah Ziyarat, supported by reliable Umrah and local transport services, ensures a meaningful and well-connected experience that brings Islamic history vividly to life.

Zeeshan is a professional driver and tour guide who has been living and driving in Saudi Arabia for the past 5 years. With deep knowledge of the roads, landmarks, and Ziyarat locations across Makkah, Madinah, Jeddah, and Taif, he helps pilgrims and travelers enjoy safe, smooth, and well-organized journeys. His experience in Umrah transport, city tours, and airport transfers makes him a trusted expert for visitors exploring Saudi Arabia.
