The story of Masjid al-Qiblatain in Madinah, where the qibla was changed from Jerusalem to the Kaaba in Makkah — the Qur'anic verse, the history, and a guide to visiting the Mosque of the Two Qiblas.
In the early years of Islam, Muslims prayed facing Jerusalem. Then, one day in Madinah, mid-way through a prayer, revelation came — and the whole congregation turned, there and then, to face the Kaaba in Makkah instead. The mosque where this happened took its name from that very moment: Masjid al-Qiblatain, "the Mosque of the Two Qiblas." It is one of the most distinctive sites in the city, marking a pivotal turning point in the life of the early Muslim community.
This guide explains what happened, the verse behind it, and what to know if you visit.
Quick answer: Masjid al-Qiblatain ("Mosque of the Two Qiblas") in northwest Madinah is where the qibla — the direction Muslims face in prayer — was changed from Bayt al-Maqdis (Jerusalem) to the Kaaba in Makkah, about a year and a half after the Hijrah. The change came by revelation, recorded in Surah Al-Baqarah (2:144), and the congregation turned to the new direction during the prayer itself — hence the "two qiblas."
Where Is Masjid al-Qiblatain?
Masjid al-Qiblatain stands in the northwest of Madinah, a few kilometres from Al-Masjid an-Nabawi. It is an easy, level visit and is often included on a tour of the city's historical mosques. The mosque has been rebuilt and expanded over the years into the elegant twin-domed building seen today.
The Story of the Qibla Change
Facing Jerusalem first
In the earliest period of Islam, and in the first months after the migration to Madinah, the Muslims prayed facing Bayt al-Maqdis — the direction of Al-Aqsa in Jerusalem. The Prophet ﷺ, however, longed for the qibla to be the Kaaba, the house built by Ibrahim (peace be upon him) in Makkah, and he would turn his face toward the sky in hope of guidance.
The revelation
The answer came in the Qur'an:
"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. And wherever you are, turn your faces toward it." (Surah Al-Baqarah, 2:144)
This command, revealed about sixteen to seventeen months after the Hijrah, established the Kaaba in Makkah as the qibla for Muslims everywhere — as it remains to this day.
Turning mid-prayer
According to the well-known account, the news reached the worshippers while they were in the middle of a congregational prayer. On learning of the command, the imam and the congregation turned together from facing Jerusalem to facing Makkah, completing the same prayer toward the new qibla. Because two directions of prayer were observed in that one place, the mosque became known as the Mosque of the Two Qiblas.
For many years the mosque visibly preserved this history with two prayer niches (mihrabs) — one in the old direction and one toward Makkah. In modern renovations the redundant niche facing the former qibla was removed, so that the building now orients cleanly toward the Kaaba, though the name and the story remain.
Why the Qibla Change Mattered
The change of qibla was far more than a matter of geography. It marked the maturing identity of the Muslim community, giving it a distinct direction of worship centred on the Kaaba — the first house of worship dedicated to the One God. The Qur'an itself frames the episode as a test of faith and obedience: would the believers follow the command of Allah and His Messenger, turning as they were told, without hesitation? Those who did demonstrated exactly the trust the moment called for.
| Quick facts | Masjid al-Qiblatain |
|---|---|
| Location | Northwest Madinah, a few km from Al-Masjid an-Nabawi |
| Meaning | "Mosque of the Two Qiblas" |
| Event | Change of the qibla from Jerusalem to the Kaaba |
| Qur'anic verse | Surah Al-Baqarah (2:144) |
| Timing | ~16–17 months after the Hijrah |
| Part of Hajj/Umrah? | No — historical visit only |
Visiting Masjid al-Qiblatain
The visit is simple and undemanding, and it is one of the most meaningful stops on a tour of Madinah's history.
- Pray two rak'ahs as a voluntary prayer (nafl) if you arrive at a suitable time — it is, after all, a mosque, and praying in it is a fine way to mark the visit. Note that there is no specific ritual unique to this mosque.
- Reflect on the moment the qibla turned. Standing where the community pivoted toward the Kaaba brings the verse to life.
- Observe mosque etiquette: modest dress, calm conduct, and respect for those praying.
- Combine it with nearby sites on the same outing for an efficient day.
A clarification worth making: the importance of this mosque is historical and educational. Visiting is not part of Hajj or Umrah, and no special blessing attaches to the building itself beyond the ordinary virtue of praying in any mosque.
Fitting Qiblatain Into Your Trip
Masjid al-Qiblatain completes the trio of Madinah's most-visited historical sites alongside Masjid Quba, the first mosque in Islam, and Mount Uhud, the site of the famous battle. Together they tell much of the story of the Prophet's years in the city.
To base yourself well, see our guide to the best areas to stay in Madinah near Al-Masjid an-Nabawi. A Saudi eSIM keeps your maps working as you move between sites, and there's more on our Madinah travel hub. If you're arriving from the holy city of Makkah, our guide on how to travel between Makkah and Madinah covers the train and transfer options.
Frequently Asked Questions
What is Masjid al-Qiblatain?
Masjid al-Qiblatain, the "Mosque of the Two Qiblas," is a mosque in Madinah where the direction of prayer (the qibla) was changed from Jerusalem to the Kaaba in Makkah during a prayer, following revelation.
Where is Masjid al-Qiblatain located?
It is in the northwest of Madinah, a few kilometres from Al-Masjid an-Nabawi, and is an easy, level visit usually included on a tour of the city's historical mosques.
Why was the qibla changed?
The Prophet ﷺ hoped to face the Kaaba, and Allah revealed the command in Surah Al-Baqarah (2:144) to turn toward al-Masjid al-Haram in Makkah. The change established the Kaaba as the qibla for all Muslims.
Why is it called the Mosque of the Two Qiblas?
Because, according to the well-known account, the worshippers were praying toward Jerusalem when the command came, and they turned mid-prayer to face Makkah — observing two qiblas in that single place.
Did the mosque really have two prayer niches?
For many years it had two mihrabs reflecting the two directions. In modern renovations the niche facing the former qibla (Jerusalem) was removed, so the building now faces only the Kaaba, while the name and history remain.
Is visiting Masjid al-Qiblatain part of Hajj or Umrah?
No. It is a historical visit. You may pray a voluntary prayer there as in any mosque, but there is no special rite unique to it.
The Bottom Line
Masjid al-Qiblatain captures a single, decisive moment — a community turning, mid-prayer, toward the Kaaba, and never turning back. It is a calm, easy visit with an outsized place in history. Pray two rak'ahs, recall the verse that changed the direction of every Muslim's prayer since, and let the site connect you to the early days of Islam in the Prophet's city.
Last updated: June 2026. This article is informational; for matters of personal religious practice, consult a qualified scholar.




