Masjid Shajarah in Makkah: The Mosque Where a Tree Walked
✅ TL;DR – Masjid Shajarah (Mosque of the Tree)
Masjid Shajarah, also known as the Mosque of the Tree, is located in Makkah’s Al-Hujun district, close to Masjid al-Jinn. It marks the miraculous spot where a tree walked toward the Prophet Muhammad ﷺ in response to his prayer.
While small and modest in appearance, the mosque carries a
A Real-Life Miracle in the Valley of Al-Hujun
A Small Mosque with a Giant Story
You’ve probably seen grand mosques with massive domes, golden crescents, intricate minarets reaching for the sky. But this one? It’s almost the opposite.
Masjid Shajarah is quiet, almost hidden, and far from glamorous. If you blink, you might walk past it without knowing the gravity of the land beneath your feet. But here’s the thing: it holds a miracle so profound that once you hear it, it stays with you.
You Can Also Read
The Prophet’s Moment of Heartbreak
Let’s face it, rejection hurts. And the Prophet Muhammad ﷺ felt it deeply. He had just faced yet another denial from the disbelievers of Makkah. That emotional weight led Him (PBUH) to raise His hands and make a heartfelt prayer:
✅ Source Summary:
- Narrator: Sayyiduna ʿUmar ibn al-Khaṭṭāb (RA)
- Event Location: Al-Hujun, in Makkah
- Occasion: Rejection by Quraysh; the Prophet ﷺ made duā for a divine sign
- Outcome: A nearby tree split the earth, came to Him (PBUH), greeted Him (PBUH) with Salām, then returned
Arabic (as narrated in Majma‘ uz-Zawā’id):
اللَّهُمَّ أَرِنِي آيَةً لا أُبَالِي مَعَهَا بِتَكْذِيبِ مَنْ كَذَّبَنِي
فَقِيلَ لَهُ: ادْعُ تِلْكَ الشَّجَرَةَ، فَدَعَاهَا، فَأَتَتْهُ وَسَلَّمَتْ، ثُمَّ رَجَعَتْ.
فَقَالَ: حَسْبِي، لا أُبَالِي مَنْ كَذَّبَنِي بَعْدَ هَذَا.
Transliteration:
“Allāhumma arinī āyatan lā ubālī maʿahā bikadhibi man kadhdhabanī.”
Faqīla lahu: “Udʿu tilka al-shajarah,” fadaʿāhā, fa-atat-hu wa-sallamat, thumma rajāʿat.
Faqāla: “Ḥasbī, lā ubālī man kadhdhabanī baʿda hādhā.”
English Translation:
“O Allah, show me a sign after which I will not care about the rejection of those who deny me.”
Then it was said to him, “Call that tree.” So he called it, and it came to him and greeted him with peace.
Then it returned. The Prophet ﷺ said: “This is enough for me. I no longer care who rejects me after this.”
📍 When & Where:
- Location: Al-Hujun, Makkah, near what is now Masjid al-Shajarah
- Timeframe: Early in the Makkan period of the Prophethood, before Hijrah
- Context: Quraysh continuously rejected His (PBUH) dawah, so this sign was granted to strengthen his heart
The Tree That Answered His Call
There was a tree in the distance. Still. Silent. Just another part of the landscape. But the Prophet ﷺ was told to call it. And when He (PBUH) did, the tree split the ground, moved toward Him (PBUH), breaking through the earth like it had a mission, and stood before Him (PBUH). It greeted Him with Salam. Then, at his command, it turned around and went back to where it came from.
There were no crowds. No trumpets. No spectacle. Just one of the most intimate miracles of Prophethood. A miracle not performed to impress, but to console.
A Moment That Changes You
Honestly? It hits differently when you realise you’re standing on that same ground. People talk about signs in the sky. But this one was in the soil. When you visit Masjid Shajarah, you’re not just entering a mosque. You’re stepping into a moment of sacred comfort. A space where faith met response, and doubt was silenced by a tree that knew exactly who the Messenger ﷺ was.
No wonder visitors describe feeling a strange stillness here, like the land hasn’t forgotten.
Where Exactly is Masjid Shajarah?
It’s tucked away in Al-Hujun, just across from Masjid al-Jinn and about 190 meters from Jannat al-Mualla cemetery. This spot is sacred ground for many reasons, but especially because of the sign granted here to the Prophet ﷺ.
The exact location often causes confusion with another mosque in Dhul Hulayfah (also called Masjid Shajarah), but this one is unique to Makkah. Nearby landmarks include:
- Masjid al-Jinn – 94 meters
- Masjid al-Rayah – across the street
- Tuwa Well – under 800 meters
Most visitors miss it because it doesn’t have the usual grandeur. But it has something deeper.
The Story Behind the Name
Why Did the Prophet ﷺ Call the Tree?
A Deeply Personal Prayer
There are moments in life when rejection cuts deeper than usual. The Prophet Muhammad ﷺ experienced this in Al-Hujun, after trying again to call the people of Makkah to Islam. Once more, they turned their backs. No matter how patient he remained, the pain was real. So, he turned to the One who always listened. He raised his hands and prayed, “O Allah, show me a sign after which I will no longer care about the rejection of these people.”
This wasn’t frustration. It was raw, personal grief. The kind of heartbreak only a Prophet could carry while still staying calm, composed, and hopeful. He didn’t ask for revenge. He asked for reassurance.
The Command to Summon a Tree
In response to that prayer, something unexpected happened. The Prophet ﷺ was told to call upon a nearby tree. Now, most people would pause there. A tree? Why a tree? But for him, submission to Allah was never up for question. He simply obeyed. And when he did, the ground shifted. The tree split through the earth and started moving. Slowly. Surely. It approached the Prophet ﷺ as though it recognised who he was.
This wasn’t some dream or vision. It happened in front of companions. The tree reached him, stood respectfully, and offered a Salam. That greeting wasn’t just words. It was a declaration: a creation of Allah acknowledging His Messenger in full awareness.
The Comfort Found in a Miracle
The Prophet ﷺ then told the tree to return, and it did. Quietly. Calmly. Back through the furrow it had torn in the soil. The Prophet ﷺ, now comforted, said, “I no longer care about their rejection.”
Let’s be honest, if a tree came walking to us, we’d probably run. But he stood firm. And he found in that moment a divine message meant just for him: You are not alone. That miracle wasn’t performed to convince the people. It was for the Prophet’s ﷺ own peace. A tender sign from the Creator to His Messenger.
Why This Still Matters Today
So why does this matter now? Because when you visit Masjid Shajarah, you’re not just seeing a building. You’re standing in the exact spot where heartbreak met hope. It’s a reminder that even in silence, creation itself can speak truth. The tree believed, even if people didn’t. And that message lives on in the soil, the stone, and the story passed down.
Every step around that mosque echoes with the memory of that miracle. Not loud. But deep. And unforgettable.
Multiple Hadith Confirm the Event
Widespread Authentic Narrations
This story of the miracle of the tree isn’t some vague or obscure legend. It’s actually recorded in several well-known and respected Hadith compilations, including Majma’ uz-Zawaid, Kitab al-Ṭabqat al-Kabir, and works by Bayhaqi and Tirmidhi. The consistency across these sources strengthens its credibility and emphasises just how important this moment was. We’re not talking about a one-time mention; this was echoed by scholars, recorded by companions, and passed down for generations.
The Details Are Striking
Across these narrations, the event remains consistent. The tree split the ground, moved towards the Prophet ﷺ with intention, greeted him with Salam, and stood before him like it knew exactly what it was doing. Then, when asked, it calmly returned to its place. These details are rich, specific, and emotionally charged. That’s not the kind of thing that’s easily forgotten, especially not by the companions who witnessed it.
Witnessed by More Than Just Humans
Here’s something powerful that many overlook. It wasn’t just companions who saw this. Some reports mention that even angels were witnesses to the moment. Think about that. A tree obeyed, greeted, and testified all in front of both the people and the unseen creation. It was a sign layered with spiritual meaning.
For the Prophet ﷺ, it meant comfort. For the disbelievers, it was a message. And for us? It’s a reminder that nature itself recognised the truth, even before many humans did.
More Than One Tree Testified
The Prophet’s ﷺ’ connection with nature was deep. Not once. Not twice. But many times, trees testified to His truth.
When Jibril Witnessed a Tree Obey
The Prophet’s ﷺ Wounds and Weariness
It wasn’t just physical. The wounds the Prophet ﷺ suffered in Makkah were emotional, spiritual, and heavy. The rejection hurt, yes, but the hostility of the Quraysh went deeper. On one of these difficult days, blood still fresh on his face, the Prophet ﷺ sat alone, quietly enduring.
That’s when Jibril appeared. Not with thunder or a sword, but with a question filled with compassion: “Do you want a sign?” Imagine that. Heaven asks Earth’s most beloved human, “Do you want reassurance?”
A Tree That Obeyed
The Prophet ﷺ didn’t shout or demand. He simply looked across the valley of Makkah, saw a tree, and nodded. At his call, the tree began to move. The ground furrowed beneath it. Its roots didn’t resist. It came. Not in chaos, not in fear. It moved with purpose. With calm.
The companions who witnessed it never forgot. The tree approached the Prophet ﷺ, stopped before him, and stood still, like a soldier before its general, like a servant before his master.
A Sign Just for the Heart
And that’s what makes this miracle unique. It wasn’t to prove anything to doubters. It wasn’t a spectacle. It was a gift. A deeply personal reminder to the Prophet ﷺ that creation itself recognises him even when people don’t. That moment of connection between Messenger and the tree? It speaks volumes about divine love, about unseen support, about staying strong when others try to break you.
Sometimes, the most powerful miracles are the quiet ones. The ones that walk to you. Silently. Faithfully.
Bedouins and the Talking Trees
There are multiple moments where Bedouins asked for proof of Prophethood. The Prophet ﷺ would call a tree or date cluster, and it would walk, speak, or even give testimony.
Most people today don’t realise how many natural elements declared him the Messenger of Allah.
The Crying Palm Trunk in Madina
Even a tree trunk cried for the Prophet ﷺ. When he stopped leaning on it to deliver sermons, it wailed like a child until He embraced it. He gave him a choice: return to the earth or live in Paradise. It chose Paradise.
Visual Snapshot of Masjid Shajarah

Tree Miracles Connected to Masjid Shajarah – A Comparative Timeline
🌳 Tree Miracles Related to Prophet Muhammad ﷺ
| Miracle Event | What Happened | Where | Who Witnessed It |
|---|---|---|---|
| Walking Tree to Prophet ﷺ | Tree split the earth, walked to Prophet ﷺ, greeted him, and returned | Al-Hujun, Makkah | Companions |
| Tree Obeys in Presence of Jibril | After Quraysh injured Prophet ﷺ, tree walked to him upon call | Valley near Makkah | Jibril, Companions |
| Tree Testifying to Bedouin | Tree spoke and testified to Prophet ﷺ’s truth when asked by a Bedouin | Outskirts of Makkah | Bedouin tribes |
| Palm Trunk Cries in Madinah | Tree trunk cried when Prophet ﷺ stopped leaning on it during sermons | Masjid al-Nabawi, Madinah | Entire congregation |
| Tree Witness for the Jinn | Prophet ﷺ used tree to testify during his da’wah to the Jinn | Near Abu Dhub, Makkah | Jinn, Angelic realm (per Tafsir) |
What Visitors Say Today

You might be thinking, “Is this mosque really worth a visit?”
Well… yes. Visitors often describe feeling a sense of calm and awe when standing there. The mosque itself is modest, but the air feels heavier. Almost like it remembers what happened.
Pilgrims report:
- A moment of goosebumps when reading the Hadiths aloud
- Quiet streets that allow deep spiritual reflection
- The closeness to Masjid al-Jinn adds deeper context
Travel Tips Before You Go

Here’s what most people don’t tell you:
- ✅ Go early morning or after Maghrib to avoid traffic
- ✅ Wear modest clothing (it’s a prayer site)
- ✅ Bring your own water if walking from Masjid al-Haram
- ✅ Stay 15 minutes longer than you think. The quiet changes you.
You Can Also Read
- Masjid al-Khayf: 2025 Guide to Makkah’s Sacred Mosque of the Prophets
- Masjid al-Bay’ah: Legacy of the First Islamic Allegiance (2025 Guide)
- Masjid Aisha: Ihram Point, History & Guide (2025 Update)
- Masjid al-Jinn: Complete 2025 Guide to Makkah’s Mysterious Mosque
- Masjid Nimrah: 2025 Guide to the Historic Mosque of Arafat
- Masjid al-Mashar al-Haram: The Sacred Landmark of Muzdalifah
FAQs about Masjid Shajarah in Makkah

❓ Frequently Asked Questions – Masjid Shajarah
Where is Masjid Shajarah located in Makkah?
Masjid Shajarah is in the Al-Hujun district, directly across from Masjid al-Jinn and near Jannat al-Mualla. It’s just a short walk from the northern side of Masjid al-Haram.
Is Masjid Shajarah the same as the mosque in Dhul Hulayfah?
No, they are completely different. The one in Dhul Hulayfah is a Miqat for entering Ihram. The Masjid Shajarah in Makkah is where a tree miraculously walked to the Prophet ﷺ.
What miracle happened at Masjid Shajarah?
The Prophet Muhammad ﷺ prayed for a sign. A tree split through the ground, walked to him, greeted him with Salam, and then returned—confirming his Prophethood.
Can I pray inside Masjid Shajarah?
Yes, it’s a fully functional mosque. Many visitors pray two Rak’ahs there as a gesture of reflection and gratitude.
What are the nearby mosques worth visiting?
You can also visit Masjid al-Jinn, Masjid al-Rayah, and Jannat al-Mualla cemetery—all just minutes away by foot.
Is there any signage or plaque at Masjid Shajarah?
No, there are no official signs explaining the miracle, which is why many pilgrims miss it entirely.
Can women visit and pray here?
Yes, women are welcome. Like other mosques in Makkah, it’s open to everyone, though space is limited.
Are there any entry fees?
No, visiting Masjid Shajarah is completely free. It’s a public place for prayer and reflection.
Is photography allowed at the mosque?
Yes, but do it respectfully. Avoid disturbing those who are praying or reciting the Qur’an.
Why is it less popular than other mosques?
Because it’s small, has no major signage, and is often confused with the Miqat mosque in Dhul Hulayfah. But spiritually, it holds








