Hadithcore
Sahih al-Bukhari, 1799
sahih

Narrated Ibn `Umar:

Whenever Allah's Messenger (ﷺ) left for Mecca, he used to pray in the mosque of Ash-Shajra, and when he returned (to Medina), he used to pray in the middle of the valley of Dhul-Hulaifa and used to pass the night there till morning.

حَدَّثَنَا أَحْمَدُ بْنُ الْحَجَّاجِ، حَدَّثَنَا أَنَسُ بْنُ عِيَاضٍ، عَنْ عُبَيْدِ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ إِذَا خَرَجَ إِلَى مَكَّةَ يُصَلِّي فِي مَسْجِدِ الشَّجَرَةِ، وَإِذَا رَجَعَ صَلَّى بِذِي الْحُلَيْفَةِ بِبَطْنِ الْوَادِي وَبَاتَ حَتَّى يُصْبِحَ‏.‏

References2 variants
In-Book Reference
Book 26, Hadith 24
USC-MSA web (English) reference
Vol. 3, Book 27, Hadith 25 (deprecated numbering scheme)
Related hadiths1
Compare isnād across 1 related chains →