The Prophet ﷺ prayed four units in Medina and two units at Dhul Hulayfah, then he spent the night there until morning. When he mounted his riding camel and it stood up straight with him, he entered the state of ihram.
صلى النبي ﷺ بالمدينة أربعا، وبذي الحليفة ركعتين، ثم بات حتى أصبح بذي الحليفة، فلما ركب راحلته واستوت به أهل.
Bukhari related it in Hajj (1546) from Abdullah bin Muhammad, who said, Hisham bin Yusuf narrated to us, Ibn Jurayj informed us, Muhammad bin Munkadir narrated to us, from Anas bin Malik, and he mentioned it.Bukhari also related it (1551) through another route, from Abu Qilaba, from Anas, and he mentioned the same, adding to it, "Until it stood level with him at Bayda, he praised Allah, glorified Him, and proclaimed His greatness, then he entered the state of ihram for Hajj and Umrah together, and the people entered ihram for both along with him."Muslim related it in the Prayer of the Traveler (690:11) as a partial version of the hadith, through two routes, Muhammad bin Munkadir and Ibrahim bin Maysara, both of whom heard Anas bin Malik, and he mentioned it, but he did not mention the ihram of the Prophet ﷺ.For this reason, some scholars of knowledge have treated it as a hadith agreed upon by both Bukhari and Muslim, while others have treated it as two independent hadiths.