Home / Al-Qiblatayn
Sacred sitesMasjid al-Qiblatayn, the mosque of the two qiblas
This mosque in northwestern Medina is tied to one of the defining moments of early Islam: the change of the direction of prayer from Jerusalem to the Kaaba in Mecca in 624 CE.
The day the qibla changed
For roughly a year and a half after the Hijrah, the Muslims of Medina prayed facing Jerusalem (Bayt al-Maqdis), as the Prophet Muhammad had done in Mecca. The Prophet, however, longed for the qibla to be turned toward the Kaaba, the sanctuary of Ibrahim in his own birthplace. In Rajab or Sha'ban of 2 AH — early 624 CE — the verse came down: "We have certainly seen the turning of your face toward the heaven, and We will surely turn you to a qibla with which you will be pleased. So turn your face toward al-Masjid al-Haram" (Quran 2:144). From that moment every prayer in Islam has faced Mecca, a change that gave the young community its own unmistakable identity.
Tradition holds that the change reached one congregation mid-prayer. The worshippers, already bowing, pivoted through nearly 180 degrees — from facing north toward Jerusalem to facing south toward Mecca — and completed the prayer in the new direction. The mosque of the Banu Salamah in northwestern Medina became known ever after as Masjid al-Qiblatayn, the Mosque of the Two Qiblas. Accounts differ on the details: some reports place the Prophet himself leading the prayer at this mosque when the revelation came, while the stronger-known narrations describe the news being carried to congregations, including Quba's, by a companion who announced the change as they prayed. Either way, the site has been venerated as the mosque of the two qiblas since the earliest centuries.
Two mihrabs, then one
For most of its history the building preserved a striking architectural oddity: two prayer niches, one facing Mecca and a second, disused niche marking the old orientation toward Jerusalem. Ottoman restorations kept both. When the mosque was completely rebuilt in 1987 by the architect Abdel-Wahed El-Wakil — the same hand behind the modern Quba Mosque — the Jerusalem-facing niche was removed, so that worshippers would face only the single valid qibla. The new building alludes to the story instead through its geometry: twin minarets and twin domes arranged on an axis, with the main dome raised over the Mecca-facing prayer hall. It is one of the most photographed mosques in the city, white and fortress-like above the Wadi al-Aqiq escarpment.
Visiting the mosque
Masjid al-Qiblatayn stands in the Bani Salamah district on the northwest side of the city, about 4–5 km from the Prophet's Mosque — around ten minutes by taxi or ride-hail (see getting around). It is a fully functioning mosque, open for the five daily prayers, free to enter, with a women's section; no permit is needed. Visitors typically pray two rakahs of greeting, note the qibla axis, and move on — fifteen to twenty minutes is enough for most.
The mosque is a fixture of the standard half-day ziyarat circuit, usually visited between Quba and the Seven Mosques, which lie a short drive east at the foot of Mount Sala; ready-made routes are in the itineraries. Its exact position is marked on the interactive map.
Why the change of qibla mattered
- A distinct identity: facing the Kaaba separated the Muslim community's practice decisively from that of the Jewish tribes of Medina, months before the tensions that would culminate in the battles of Uhud and the Trench.
- Continuity with Ibrahim: the Quran frames the Kaaba qibla as a return to the sanctuary built by Ibrahim and Ismail, tying Islam's ritual centre to the oldest monotheist lineage.
- A test of obedience: the verses surrounding 2:144 present the change explicitly as a test distinguishing those who follow the Messenger; classical commentators dwell on the readiness of the Medinan congregations to turn on the spot.
- A permanent fact of practice: every mosque built since — including all of Medina's — is oriented on a calculated bearing to Mecca, and the story of Qiblatayn is the standard illustration of why.
The wider context of these first Medinan years — the pact between the tribes, the early raids and the shaping of the community — is covered in the history section.