🕋 Qibla · History

What Was the First Qibla? The Change from Jerusalem to Makkah

Before the Kaaba, there was Jerusalem — sixteen months of prayer facing a direction that would later change mid-prayer, at a mosque that still carries the name of that exact moment.

📖 6 min read 🕋 Qibla 🗓️ Updated August 11, 2026
🕌 Makkah era faced Jerusalem 🚶 Hijrah to Madinah ~16-17 months, same Qibla 🔄 Qibla changes mid-prayer, to the Kaaba
Table of Contents
  1. The First Qibla Was Jerusalem
  2. The Change, Mid-Prayer
  3. Masjid al-Qiblatain — the Mosque of Two Qiblas
  4. Why the Qibla Changed
  5. Does Jerusalem Still Matter?
  6. What This Has to Do With Your Qibla Today
  7. FAQ

The First Qibla Was Jerusalem

Long before "which direction is Qibla" meant checking an app, it meant facing Masjid al-Aqsa in Jerusalem. This was the direction of prayer throughout the Prophet's ﷺ time in Makkah, and it continued for roughly 16 to 17 months after the migration (Hijrah) to Madinah. For well over a year of the earliest Islamic prayers, Jerusalem — not Makkah — was the direction believers turned toward.

Interestingly, while still in Makkah, geography made this easier than it sounds: since Jerusalem lies north of Makkah, the Prophet ﷺ would position himself so that facing Jerusalem also meant having the Kaaba somewhere in his line of sight — facing one sacred direction without fully turning away from the other.

The Change, Mid-Prayer

The shift to Makkah didn't happen quietly between prayers — tradition describes it happening in the middle of one. The Prophet ﷺ had reportedly been hoping for this change, looking to the sky in anticipation, when the revelation came. The congregation, already facing Jerusalem, turned together to face the Kaaba instead, partway through the prayer they were in.

A detail worth sitting with: the companions didn't wait for the next prayer to adjust — they turned mid-rakah, together, the moment the instruction came. That kind of immediate, collective response is part of why this moment is remembered so specifically.

Masjid al-Qiblatain — the Mosque of Two Qiblas

The mosque in Madinah where this happened is still standing today, known as Masjid al-Qiblatain — "the Mosque of the Two Qiblas." Its layout preserves the memory of that exact moment, historically containing two mihrabs (prayer niches): one oriented toward Jerusalem, one toward Makkah. It remains a site visited by pilgrims in Madinah specifically because of this history.

Why the Qibla Changed

The change is recorded in the Quran itself, in Surah Al-Baqarah: "So turn your face toward al-Masjid al-Haram. And wherever you are, turn your faces toward it." (2:144). Beyond the revelation itself, the shift to the Kaaba carried a specific significance — the Kaaba's construction is linked to Ibrahim (peace be upon him), connecting the new direction of prayer to that earlier prophetic legacy, and giving the Muslim community a direction of its own, distinct from the Qibla shared with the Jewish community in Madinah at the time.

Does Jerusalem Still Matter?

Yes — the change in direction didn't diminish Jerusalem's standing. Masjid al-Aqsa remains the third holiest site in Islam, and its history as the first Qibla is still taught and respected precisely because of what it represents: a direction chosen by revelation, held faithfully for over a year, and then changed by the same authority that established it in the first place.

What This Has to Do With Your Qibla Today

Every calculation used today — the exact bearing you get from a Qibla app, the degree figures in our city-by-city guide, the compass work covered in how to find your direction — all point toward that same location the Qibla changed to at Masjid al-Qiblatain. The specific number your phone calculates, whether it's 43.5° from Dallas or a different figure from wherever you are, is a modern, precise version of the same act performed by that congregation in Madinah: turning to face the Kaaba, on instruction, without hesitation.

Frequently Asked Questions

What was the first Qibla in Islam?
The first Qibla was Masjid al-Aqsa in Jerusalem. Muslims faced this direction during the Prophet's ﷺ time in Makkah and for roughly 16-17 months after the migration to Madinah, before the Qibla changed to the Kaaba.
Why did the Qibla change from Jerusalem to Makkah?
The change came through revelation, recorded in Surah Al-Baqarah (2:144), after the Prophet ﷺ had been repeatedly looking to the sky in hope of this direction. The Kaaba, built by Ibrahim (peace be upon him), connected the new direction of prayer to that earlier prophetic legacy.
Where did the Qibla change happen?
According to tradition, the change happened mid-prayer at a mosque in Madinah, now known as Masjid al-Qiblatain ("the Mosque of the Two Qiblas") because the congregation turned from facing Jerusalem to facing Makkah partway through that prayer.
Do Muslims still consider Jerusalem significant?
Yes. Masjid al-Aqsa remains the third holiest site in Islam, and its status as the first Qibla is still widely taught and respected, even though it's no longer the direction Muslims pray toward.
How long did Muslims pray toward Jerusalem?
Muslims faced Jerusalem throughout the Makkan period of the Prophet's ﷺ mission and for about 16-17 months after the migration (Hijrah) to Madinah, before the revelation changing the Qibla to the Kaaba.

Sixteen months facing one direction, a revelation, and a congregation that turned without hesitation — the exact bearing has been recalculated a thousand ways since, but the act itself hasn't changed at all.

Sources: Surah Al-Baqarah 2:144 · Sahih al-Bukhari (the change of Qibla) · Masjid al-Qiblatain — general reference.
Face the same direction, calculated precisely

SabrTime's Qibla compass uses your live location for an accurate bearing — free, no ads, no login.

Open SabrTime
Yunus Khan
Written by Yunus Khan
Founder of SabrTime — Building free Islamic digital tools that help Muslims strengthen their worship through technology.