In Ṣaḥīḥ al-Bukhārī it is related from Anas:
“The Messenger of Allah—may Allah bless him and grant him peace—performed the ẓuhr (noon) prayer with us in Madinah as four units, and he prayed ʿaṣr at Dhū al-Ḥulayfah as two units. He then spent the night there until morning, mounted his camel, and when it reached the plain of al-Bayḍāʾ he praised Allah, declared His transcendence, and pronounced takbīr (saying ‘Allāhu akbar’). He then proclaimed the talbiyah for both ʿumrah and Hajj.”
The hadith continues beyond this point.
Abū Hurayrah related:
“A man said, ‘O Messenger of Allah, I intend to travel, so advise me.’ He replied, ‘Hold fast to taqwā (god-consciousness) of Allah and pronounce takbīr over every rise in the terrain.’ When the man turned to leave, the Prophet supplicated, ‘O Allah, shorten the distance for him and make the journey easy.’”
Imāms Aḥmad, al-Tirmidhī, and al-Nasāʾī transmitted this report.