Skip to the content
Independent guide. Not the Ministry of Hajj and Umrah, and not any government body. Official sites →
Places

Masjid al-Qiblatayn

Masjid al-Qiblatayn means the Mosque of the Two Qiblas. It stands in north-western Madinah, and tradition links it with the moment the Prophet and his companions turned from praying towards Jerusalem to praying towards the Kaaba. It is a regular stop on tours of the historic sites of Madinah.

The change of the qibla

For the first Muslims in Makkah and in the first months at Madinah, prayer was directed towards Jerusalem. The Prophet, though, is reported to have wished to face the Kaaba, the house built by Ibrahim and Isma'il. The Quran answers this in the second chapter: "We have seen you turning your face towards the heaven; so We shall turn you to a qibla that will please you. Turn your face towards the Sacred Mosque" (2:144). The surrounding verses, 2:142 to 2:150, explain that the direction is a test of obedience and that God's is the east and the west.

The earliest narrations, such as the one from al-Bara' ibn Azib recorded in Sahih al-Bukhari (number 399), say that the Muslims had prayed towards Jerusalem for sixteen or seventeen months after the Hijrah. Counting from the arrival in Madinah in 622, that points to around early 624, which is the second year of the Islamic calendar. Some later writers give the month as Rajab, others as Sha'ban, so you will see slightly different dates.

The story of the mosque

The mosque belonged to the Banu Salamah, a clan of the Ansar. A tradition says that the Prophet was visiting them, or leading the midday prayer, when the revelation came, and that he and the congregation turned around in the middle of the prayer. Because they prayed facing two directions in a single prayer, the place came to be known as the mosque of the two qiblas.

Not all the accounts agree. Another well-known narration, in Sahih al-Bukhari (number 403), says that people at Quba were praying the dawn prayer when a man came to tell them that the Prophet had been commanded to face the Kaaba, and they turned. Historians and scholars have tried to reconcile the reports in different ways, such as by saying that news travelled from one mosque to another in the same day, or that the change happened in the Prophet's own mosque. The scholars do not agree about exactly where it was first prayed, and this mosque is the place that tradition has most strongly connected with it. See also Quba Mosque.

The building over time

The mosque seen today is modern, and little of the original structure survives. Local sources record repairs to its roof under the Mamluk governors at the end of the 15th century (893 AH) and again in the Ottoman period in the mid-16th century (950 AH), under Suleiman the Magnificent. Under Saudi rule, it was renewed in the 1930s and then almost entirely rebuilt and enlarged in 1987 (1408 AH), during the reign of King Fahd. The present building has two minarets and two domes. The exact details of the earlier work are less well documented than the 1987 rebuild, so treat the older dates as approximate.

Visiting today

The mosque is in the north-west of the city, roughly 4 km from the Prophet's Mosque, and is easily reached by taxi. It is usually combined with Quba and Mount Uhud in a half-day tour of the historic sites. It is an active mosque, so you can pray the obligatory or voluntary prayers there, and it is open to men and women. Visitors who enter generally pray two rak'ahs, as it is recommended to do when entering any mosque.

There is no rite of Hajj or Umrah connected to it, and visiting it is not required. Respect the prayer times, as the mosque can be busy after the obligatory prayers and with tour groups. Photography is generally tolerated outside prayer times, but ask staff if unsure. Opening hours and access arrangements change, so check locally.

Sources

Page updated 2026-11-21