in their adhān for the five daily prayers and from the high places, as Jābir ibn ʿAbd Allāh said:
“We were with the Messenger of Allah—may Allah bless him and grant him peace—when, if we ascended we would say ‘Allāhu akbar,’ and if we descended we would say ‘subḥān Allāh.’ The formal prayer was later prescribed on that pattern.”
Abū Dāwūd and others narrated this report.
In the two Ṣaḥīḥ collections it is related from Ibn ʿUmar:
“Whenever the Messenger of Allah—may Allah bless him and grant him peace—returned from an army, a detachment, the Hajj, or ʿumrah, and his mount reached the top of a pass or an open rise, he would pronounce ‘Allāhu akbar’ three times and then say:
‘There is no god but Allah alone, without partner; to Him belongs the dominion and to Him belongs all praise, and He is over all things powerful. We return, repentant, worshipping, prostrating, and praising our Lord. Allah fulfilled His promise, supported His servant, and single-handedly routed the confederates.’”