Al-Rayah Mosque

MedinaSaudi Arabia 24° N · 39° E Updated Jul 2025

Nestled atop Mount Dzubab in the historic city of Medina, Saudi Arabia, Al-Rayah Mosque (مسجد الراية), also known as the Mosque of the Flag or Dzubab Mosque,…

View map

Introduction to Al-Rayah Mosque and Its Significance

Nestled atop Mount Dzubab in Medina, Saudi Arabia, Al-Rayah Mosque (مسجد الراية)—also known as the Mosque of the Flag or Dzubab Mosque—stands as a testament to early Islamic history. Revered for its association with the pivotal Battle of the Trench (Ghazwat al-Khandaq) in 627 CE, the mosque marks the site where Prophet Muhammad (peace be upon him) raised his battle flag, symbolizing steadfast leadership and resilience. Originally constructed during the reign of Umar ibn Abdul Aziz (705–711 CE), Al-Rayah Mosque’s modest architecture reflects an enduring commitment to function and commemoration over embellishment, persisting through centuries of renovations. Today, it offers visitors spiritual reflection, historical insight, and panoramic views of Medina, enriching the city’s Islamic heritage alongside other landmarks such as the Prophet’s Mosque, Mount Sela’, and the Seven Mosques. This guide explores Al-Rayah Mosque’s origins, cultural significance, practical visitor information—including hours, tickets, accessibility, and nearby attractions—and provides resources for further planning (Madain Project, Life in Saudi Arabia, Visit Al Madinah).


Origins and Early Construction

Al-Rayah Mosque’s origins are intimately connected to the events of the Battle of the Trench (627 CE), during which the Prophet Muhammad’s command post was established on Mount Dzubab (Madain Project). The mosque’s initial structure, built during the reign of Umar ibn Abdul Aziz, was a simple square measuring about 61 square meters and 5 meters in height, reflecting early Islamic architectural priorities of purpose and remembrance rather than extravagance.

The Battle of the Trench: Strategic Significance

The Battle of the Trench was decisive for the nascent Muslim community in Medina. The Muslims, besieged by opposing tribes, dug a trench based on the advice of Salman al-Farsi, creating a formidable defense line. The Prophet’s flag was raised on Mount Dzubab—the very location of Al-Rayah Mosque—making the site a symbol of unity, leadership, and perseverance (Life in Saudi Arabia).

Architectural Evolution and Preservation

Despite various reconstructions during the Ottoman and Saudi eras, Al-Rayah Mosque has retained its humble size and unadorned design, maintaining its historical character (Madain Project). Modern materials have been incorporated, but the essence of early Islamic architecture remains.

Religious and Cultural Importance

Beyond its historical value, Al-Rayah Mosque is a symbol of the faith and unity of Medina’s early Muslim community. It attracts both pilgrims and tourists, serving as a living reminder of the sacrifices and wisdom that shaped Islamic history (Life in Saudi Arabia).

Al-Rayah Mosque in Medina’s Historical Landscape

Situated near Mount Sela’ and the Seven Mosques (Masajid al-Sab’a), Al-Rayah Mosque offers visitors a unique vantage point for understanding Medina’s strategic geography during the Prophet’s time. Its elevated position provides panoramic views of the city, contextualizing historical narratives (Madain Project).


Visiting Al-Rayah Mosque: Practical Information

Visiting Hours

  • General Hours Open daily from 8:00 AM to 6:00 PM. Hours may vary during Ramadan or religious holidays; confirm before visiting.
  • Prayer Times The mosque is busiest during prayer times. Non-prayer hours are ideal for quiet visits or sightseeing.

Tickets and Entry Fees

  • Entry Free of charge for all visitors.
  • Guided Tours Available through local operators and may include other historical sites; fees may apply (Visit Al Madinah).

Accessibility and Travel Tips

  • Getting There Located atop Mount Dzubab, near Mount Sela’, with Al-‘Uyun Street on the left and Sulthanah Street behind. Accessible by car, taxi, or on foot from central Medina (Trek Zone). Ride-hailing apps like Careem and Uber are recommended.
  • Physical Accessibility Reaching the mosque requires a moderate uphill walk on uneven terrain. Not recommended for visitors with mobility challenges.
  • Best Time to Visit November to March offers the most comfortable weather.
  • Travel Essentials Wear sturdy shoes, bring water, and plan for the lack of on-site amenities.

Dress Code and Etiquette

  • Attire Modest dress is required. Men should wear long trousers and shirts with sleeves; women should wear loose-fitting clothing and a headscarf or abaya (KSA Journeys).
  • Conduct Maintain a respectful demeanor, speak softly, and avoid public displays of affection.

Photography Guidelines

  • Permitted Exterior photography, especially panoramic shots from the hilltop.
  • Restricted Avoid photographing people at prayer or without their consent. Refrain from photography during prayer times (KSA Journeys, Kosupa Travel).

Facilities and Amenities

  • On-site No restrooms, shops, or refreshment stands. Prepare accordingly (KSA Journeys).
  • Nearby Facilities available in central Medina and near the Prophet’s Mosque.

Nearby Attractions and Suggested Itineraries

  • The Prophet’s Mosque (Al-Masjid an-Nabawi) Islam’s second holiest site, about a 20–25 minute walk (Trek Zone).
  • The Seven Mosques Historic complex linked to the Battle of the Trench, within walking distance.
  • Masjid Quba The first mosque in Islam, accessible by car (KSA Journeys).
  • Mount Uhud Site of the Battle of Uhud, a short drive away.
  • Old Bazaar Traditional market for souvenirs and local culture.

Suggested Itinerary: Morning climb to Al-Rayah Mosque, visit the Seven Mosques, and conclude the day at the Prophet’s Mosque.


Cultural Sensitivity and Local Customs

  • Ramadan Do not eat, drink, or smoke in public during daylight hours.
  • Greetings Use “As-salamu alaykum” when greeting locals.
  • Non-Muslim Visitors Al-Rayah Mosque is outside the Haram boundary, so respectful non-Muslims may visit the mosque’s exterior (Kosupa Travel), but inner sanctuaries are restricted.

Health, Safety, and Entry Requirements

  • Visa Saudi eVisa or consular visa required for entry (eVisa Info).
  • Vaccinations Check for up-to-date health requirements, especially during Hajj and Umrah seasons.
  • Safety Medina is considered safe, but standard travel precautions apply (The Pilgrim).
  • Insurance Strongly recommended for health and travel emergencies.

Visitor FAQs

Q: What are the visiting hours?
A: Open daily from 8:00 AM to 6:00 PM; hours may vary during holidays.

Q: Is there an entry fee?
A: No, entry is free.

Q: Can non-Muslims visit?
A: Non-Muslims may visit the exterior; prayer areas are restricted to Muslims.

Q: Are guided tours available?
A: Yes, bookable via local operators and some travel apps.

Q: Is the mosque accessible for those with limited mobility?
A: The climb is moderate and may not be suitable for those with mobility challenges.

Q: What should I wear?
A: Modest attire—long trousers and sleeves for men, loose clothing and a headscarf or abaya for women.

Q: Are facilities available on site?
A: No, there are no restrooms or shops at the mosque.


Visuals and Media Recommendations

  • Images

    Alt: Al-Rayah Mosque exterior view, Medina historical site

    Alt: Map of Medina with Al-Rayah Mosque location marked

  • Interactive Maps and Virtual Tours
    Use Mapcarta for location references.