Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:1799Aḥmad b. al-Ḥajjāj > Anas b. ʿIyāḍ > ʿUbaydullāh > Nāfiʿ > Ibn ʿUmar

Whenever Messenger of Allah ﷺ 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.  

البخاري:١٧٩٩حَدَّثَنَا أَحْمَدُ بْنُ الْحَجَّاجِ حَدَّثَنَا أَنَسُ بْنُ عِيَاضٍ عَنْ عُبَيْدِ اللَّهِ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ ؓ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا خَرَجَ إِلَى مَكَّةَ يُصَلِّي فِي مَسْجِدِ الشَّجَرَةِ وَإِذَا رَجَعَ صَلَّى بِذِي الْحُلَيْفَةِ بِبَطْنِ الْوَادِي وَبَاتَ حَتَّى يُصْبِحَ  


See similar narrations below:

Collected by Bukhārī, Bayhaqī
bukhari:1533Ibrāhīm b. al-Mundhir > Anas b. ʿIyāḍ > ʿUbaydullāh > Nāfiʿ > ʿAbdullāh b. ʿUmar

Messenger of Allah ﷺ used to go (for Hajj) via Ash-Shajara way and return via Muarras way; and no doubt, whenever Messenger of Allah ﷺ went to Mecca, he used to offer the prayer in the Mosque of Ash-Shajara; and on his return, he used to offer the prayer at Dhul-Hulaifa in the middle of the valley, and pass the night there till morning.  

البخاري:١٥٣٣حَدَّثَنَا إِبْرَاهِيمُ بْنُ الْمُنْذِرِ حَدَّثَنَا أَنَسُ بْنُ عِيَاضٍ عَنْ عُبَيْدِ اللَّهِ عَنْ نَافِعٍ عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ ؓ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يَخْرُجُ مِنْ طَرِيقِ الشَّجَرَةِ وَيَدْخُلُ مِنْ طَرِيقِ الْمُعَرَّسِ وَأَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا خَرَجَ إِلَى مَكَّةَ يُصَلِّي فِي مَسْجِدِ الشَّجَرَةِ وَإِذَا رَجَعَ صَلَّى بِذِي الْحُلَيْفَةِ بِبَطْنِ الْوَادِي وَبَاتَ حَتَّى يُصْبِحَ  

bayhaqi:10367Muḥammad b. ʿAbdullāh al-Ḥāfiẓ > Muḥammad b. Ṣāliḥ b. Hāniʾ > Ibrāhīm b. Abū Ṭālib > Hārūn b. al-Farwī > Abū Ḍamrah > ʿUbaydullāh > Nāfiʿ > Ibn ʿUmar

[Machine] The Prophet ﷺ used to pray in the Mosque of the Tree when he went out to Makkah, and when he returned, he would pray in Dhul-Hulayfah in the belly of the valley and stay there until morning.  

البيهقي:١٠٣٦٧أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللهِ الْحَافِظُ ثنا مُحَمَّدُ بْنُ صَالِحِ بْنِ هَانِئٍ ثنا إِبْرَاهِيمُ بْنُ أَبِي طَالِبٍ حَدَّثَنِي هَارُونُ بْنُ الْفَرْوِيِّ ثنا أَبُو ضَمْرَةَ عَنْ عُبَيْدِ اللهِ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ

أَنَّ رَسُولَ اللهِ ﷺ كَانَ إِذَا خَرَجَ إِلَى مَكَّةَ صَلَّى فِي مَسْجِدِ الشَّجَرَةِ وَإِذَا رَجَعَ صَلَّى بِذِي الْحُلَيْفَةِ بِبَطْنِ الْوَادِي وَبَاتَ بِهَا حَتَّى يُصْبِحَ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ إِبْرَاهِيمَ بْنِ الْمُنْذِرِ وَغيْرِهِ عَنْ أَبِي ضَمْرَةَ