Masjid al-Qiblatain, “the mosque of the two qiblas”, is a mosque in Madinah linked to the change of the direction of prayer from Jerusalem to the Kaaba in the second year after the Hijrah. Its white minarets stand on Khalid bin al-Walid Road, about 4 km from the Prophet’s Mosque.
This guide sets out what the Quran and sahih hadith say about the change, what the historians report about the mosque’s name, how the building has grown, and how to include it in your days in Madinah.
Key takeaways
- The change: after praying towards Jerusalem for sixteen or seventeen months, the Muslims were told to face the Kaaba (Quran 2:144).
- The name: comes from a report in Ibn Sa’d’s Tabaqat about the mosque of Banu Salamah; the reports differ on the details.
- The building: rebuilt under King Fahd in 1987, about 3,920 m².
- Your visit: a history visit; pray there as in any mosque.
What is Masjid al-Qiblatain?
Masjid al-Qiblatain is a historical mosque in Madinah, named after the two directions of prayer. Saudipedia links it to a visit the Prophet ﷺ made to Umm Bishr of Banu Salama: during the Dhuhr prayer, revelation came to turn towards the Kaaba. Its first building dates from the second year after the Hijrah.

That first mosque was built by Banu Suwad bin Ghannam bin Ka’b from palm trunks and fronds. It stood on raised ground in Harrat al-Wabrah, overlooking part of Wadi al-Aqiq, and it once had two sections: an inner one with a mihrab towards the Kaaba and an outer one with a mihrab towards al-Sham (Saudipedia).
Today the mosque sits on Khalid bin al-Walid Road, about 4 km from the Prophet’s Mosque, and covers about 3,920 m². It also features in our guide to places to visit in Madinah, with the other historical sites of the city.
The change of the qiblah
When the Prophet ﷺ first settled in Madinah, the Muslims prayed towards Bayt al-Maqdis in Jerusalem. Al-Bara’ bin Azib said the Prophet ﷺ prayed that way “for sixteen or seventeen months but he loved to face the Ka`ba”, and then Allah revealed the verse that changed the direction (Sahih al-Bukhari 399):
قَدْ نَرَىٰ تَقَلُّبَ وَجْهِكَ فِى ٱلسَّمَآءِ ۖ فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَىٰهَا ۚ فَوَلِّ وَجْهَكَ شَطْرَ ٱلْمَسْجِدِ ٱلْحَرَامِ ۚ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا۟ وُجُوهَكُمْ شَطْرَهُۥ
Transliteration: Qad nara taqalluba wajhika fis-sama’, fa-lanuwalliyannaka qiblatan tardaha, fa-walli wajhaka shatral-Masjidil-Haram, wa haythu ma kuntum fa-wallu wujuhakum shatrah.
Meaning: “Indeed, We see you ˹O Prophet˺ turning your face towards heaven. Now We will make you turn towards a direction ˹of prayer˺ that will please you. So turn your face towards the Sacred Mosque ˹in Mecca˺—wherever you are, turn your faces towards it.”
Reference: Quran 2:144 (meaning: Dr. Mustafa Khattab, The Clear Quran (quran.com)).

The verses just before it explain the change. Some people would ask why the Muslims had turned away from their old direction, and the answer given is that “The east and west belong ˹only˺ to Allah” (Quran 2:142).
The next verse calls the former direction a test: “We assigned your former direction of prayer only to distinguish those who would remain faithful to the Messenger from those who would lose faith” (Quran 2:143). The same verse reassures the believers that Allah would never let their faith go to waste.
From that day, every Muslim prayer has faced the Kaaba in Makkah. When you pray in Masjid al-Haram during your Umrah, you stand around the same Sacred Mosque that this verse names.
Why is it called the mosque of the two qiblas?
The name comes from the historians, not from a sahih hadith. Ibn Sa’d’s Tabaqat reports that the Prophet ﷺ was leading the Dhuhr prayer at the mosque of Banu Salamah, after visiting Umm Bishr, when he was told to face the Kaaba, and he turned. That place became known as Masjid al-Qiblatayn (IslamQA).

The sahih hadith show that people turned towards the Kaaba in more than one mosque. At Quba, a man reached people praying Fajr and told them the Prophet ﷺ had been ordered to face the Kaaba, so they turned (Sahih al-Bukhari 403; Sahih Muslim 526). Our guide to Masjid Quba covers that mosque.
Al-Bara’ bin Azib reported that a man who had prayed with the Prophet ﷺ found some of the Ansar praying Asr towards Jerusalem, and they turned (Sahih al-Bukhari 399); IslamQA places this in the mosque of Banu Harithah. In another report, a man from Banu Salama found people bowing in the dawn prayer and called out that the qiblah had changed (Sahih Muslim 527).
IslamQA notes that Ibn Sa’d gives the story without a chain of narrators, saying only “it was said”. Ibn Hajar wrote that the reports differ on which prayer it was and in which mosque. So read the name as a historical tradition, and tell the story as one.
History of Masjid al-Qiblatain
Masjid al-Qiblatain history, as Saudipedia records it, is a long line of rebuilding. Umar bin Abdulaziz restored the mosque in 706, as part of his work on the mosques where the Prophet ﷺ had prayed. Shahin al-Jamali renovated it in 1488, and King Abdulaziz rebuilt it in 1931 with a surrounding wall and its own minaret, enlarging it to 425 m².

The present building dates from the reign of King Fahd, when the mosque was rebuilt in 1987 and reached about 3,920 m². Repairs followed under King Abdullah and King Salman (Saudipedia).
The newest work is the Al-Qiblatayn Cultural Center project, overseen by the Al-Madinah Region Development Authority. It covers 7,500 m² with new courtyards, roads, traffic planning and parking, and it expands the mosque to hold 6,260 worshippers.
Visiting Masjid al-Qiblatain
Treat Masjid al-Qiblatain, Madinah’s mosque of the two qiblas, as a history visit. IslamQA quotes Shaykh Ibn Baz: the Seven Mosques, Masjid al-Qiblatayn and similar places are not on the list of places prescribed for a visit, and there is no evidence for treating them so.

If you arrive at a prayer time, pray with the congregation; at other times, pray two rak’ahs on entering, as in any mosque. Some historians count it with the Seven Mosques, about 1 km away, because visitors often see them on the same trip (Saudipedia).
At Babul Haram Travels, guided ziyarat is included in our Umrah packages, and your written quote lists the sites it covers.
Questions about Masjid al-Qiblatain
When did the qiblah change?
Al-Bara’ bin Azib said the Muslims prayed towards Jerusalem for sixteen or seventeen months after the Hijrah (Sahih al-Bukhari 399). Saudipedia dates the change to the middle of Sha’ban in the second year after the Hijrah; other reports give a different month.
Is praying in Masjid al-Qiblatain special?
The Sunnah gives it no special status. IslamQA quotes Shaykh Ibn Baz that it is not among the places prescribed for a visit, so pray there as you would in any other mosque.
Where is Masjid al-Qiblatain?
In Madinah, on Khalid bin al-Walid Road, about 4 km from the Prophet’s Mosque (Saudipedia). It stands in the old area of Banu Salamah, and the Seven Mosques are about 1 km away.
Did the Companions turn while praying?
Yes. People praying Fajr at Quba turned when they heard the news (Sahih al-Bukhari 403, Sahih Muslim 526). Others turned during Asr (Sahih al-Bukhari 399), and people bowing in the dawn prayer turned in that very state (Sahih Muslim 527).
Is a visit included in your packages?
Yes. Guided ziyarat is included in our Umrah packages, and your written quote lists the sites it covers. Every package also has a group guide or scholar who helps with the rites.
Your next step
Masjid al-Qiblatain recalls the day the Muslims turned to the Kaaba. Read Quran 2:142–144 before you go, enjoy the history, and pray there as you would in any mosque.
Planning your Umrah from the UK? Send us your dates and ask for a written quote on WhatsApp, with flights, hotels, visa, transfers and ziyarat listed separately, or compare our Umrah packages first.
Reviewed by Babul Haram Travels team · editorial review 27 November 2026. Official pages checked on 27 November 2026. For a personal religious ruling, consult a qualified scholar.
Hadith from Sahih al-Bukhari and Sahih Muslim carry no separate grade on sunnah.com. Quran translations are from The Clear Quran (Dr Mustafa Khattab) on quran.com.
Photo sources: Location photographs are credited under each image and do not show our customers. Featured photo: Masjid al-Qiblatayn (photographed 2025), resized and cropped for this guide; photo by Diego Delso, CC BY-SA 4.0.