Open Travel Guide
  1. Home
  2. Destinations
  3. Saudi Arabia
  4. Al Madinah
  5. Madinah
  6. History
  7. The Seven Mosques and the Battle of the Trench

History · Al Madinah, Madinah

The Seven Mosques and the Battle of the Trench

  • Era627 CE (5 AH); later restorations
  • AdmissionFree
  • HoursOpen air; mosques follow prayer times

The Battle of the Trench (Khandaq) took place in 627 CE (5 AH), when a confederation of Makkan and allied tribes besieged Madinah. On the advice of Salman al-Farisi the defenders dug a trench across the open north-western approaches, which held the attackers back until the siege collapsed. The Seven Mosques complex stands on the western flank of Mount Sala' near the line of the trench.

Cluster of small mosques beside Mount Sala' tied to the Battle of the Trench in 627 CE.

The Battle of the Trench (Khandaq) took place in 627 CE (5 AH), when a confederation of Makkan and allied tribes besieged Madinah. On the advice of Salman al-Farisi the defenders dug a trench across the open north-western approaches, which held the attackers back until the siege collapsed. The Seven Mosques complex stands on the western flank of Mount Sala' near the line of the trench. Six small mosques are listed from north to south as Al-Fath, Salman al-Farisi, Abu Bakr as-Siddiq, Umar ibn al-Khattab, Ali ibn Abi Talib and Fatimah az-Zahra, and the nearby Masjid al-Qiblatayn is customarily counted as the seventh. Al-Fath, the largest, is named in tradition for the chapter of the Quran revealed after the events or for the Prophet's prayers there. Dating of the present buildings varies by source, with Umayyad origins and Ottoman and Saudi restorations. Individual mosques may be closed outside prayer times. The area is free and open air.

Practical information for The Seven Mosques and the Battle of the Trench · Last updated September 2026
Admission Free
Hours Open air; mosques follow prayer times
Address Seven Mosques, Al Khandaq, Madinah

Why it matters

Siege of Madinah and defensive trench

Location

Seven Mosques, Al Khandaq, Madinah

24.4768, 39.5960 View on map

Highlights

  • Battle of the Trench, 627 CE
  • Al-Fath, the largest of the cluster
  • Mount Sala' viewpoint over the city edge
  • Short walk from Masjid al-Qiblatayn

Tips for visiting

  • Visit early; there is little shade.
  • Check whether the small mosques are open.
  • Combine with Qiblatayn and Uhud on the Red Route.
  • Dress modestly.

When to visit

Early morning from October to March.

Frequently asked questions

Why are there seven mosques?

Six small mosques form the cluster and Masjid al-Qiblatayn is counted as the seventh.

What happened here?

A trench dug in 627 CE protected Madinah during the siege known as the Battle of the Trench.

Is there a fee?

No.

Which is the largest?

Al-Fath.