Overview
Khandaq (“trench”) is the area in north-west Madinah where the Muslims dug a defensive trench before the Battle of the Trench (also called the Battle of the Confederates, al-Ahzab) in 5 AH (627 CE).
History
A large coalition of Quraysh and allied tribes besieged Madinah. According to the sirah sources, Salman al-Farisi suggested digging a trench across the open northern approach, and the Prophet ﷺ worked alongside the Companions in digging it. After a siege of several weeks, a fierce wind and divisions among the besiegers caused them to withdraw. Surah al-Ahzab describes these events (Qur’an 33:9–27).
The Seven Mosques
Several small mosques in this area, known as the “Seven Mosques”, are traditionally associated with positions held during the battle; the largest is Masjid al-Fath. The link between each small mosque and a specific Companion is based on later local tradition and is not established by authentic narrations. A new large mosque was built nearby in the modern period.
Map
Visiting information
Visited on Madinah Ziyarat tours. No trace of the trench remains; the site is marked by the mosques.
Related Ziyarat locations
Dar Al Madinah Museum
A museum dedicated to the history and urban heritage of Madinah and the Prophet's Mosque.
Read history & details →Masjid al-Ghamamah
The historic mosque on the site of the Prophet's ﷺ Eid prayer ground (musalla) in Madinah.
Read history & details →Dhul-Hulayfah (Abyar Ali Miqat)
The miqat of the people of Madinah, where pilgrims travelling from Madinah enter ihram for Umrah or Hajj.
Read history & details →Masjid Jumuah
The mosque marking where the Prophet ﷺ led the first Friday (Jumu'ah) prayer on his way from Quba into Madinah.
Read history & details →Al-Baqi
The historic cemetery of Madinah beside the Prophet's Mosque, resting place of many Companions and members of the Prophet's ﷺ family.
Read history & details →Mount Uhud
The mountain north of Madinah, site of the Battle of Uhud (3 AH) and the graves of its martyrs including Hamzah.
Read history & details →Related Ziyarat tours & packages
Group Umrah
Organised Umrah for mosques, communities and families travelling together.
View details →Premium Umrah Package
Premium hotels near the Haram, private vehicles and personalised Ziyarat.
View details →Standard Umrah Package
Comfortable hotels closer to the Haram, private transfers and guided Ziyarat.
View details →Visit Khandaq with ZiyaraWay
Private and group Ziyarat tours with transport and guidance.
Book a Ziyarat tour Ask on WhatsAppSources & references
- Qur'an 33:9–27 — https://quran.com/33/9-27
- Britannica: Battle of the Trench — https://www.britannica.com/event/Battle-of-the-Trench
Historical reports sometimes differ; where they do, this page notes it. Please consult qualified scholars for religious rulings. Visiting rules and opening times are set by the Saudi authorities and may change.








