Abdullah b. 'Umar reported that whenever Allah's Messenger (ﷺ) came back from the battle or from expeditions or from Hajj or Umra and as he reached the top of the hillock or upon the elevated hard ground, he uttered Allah-o- Akbar thrice, and then said
There is no god but Allah. He is One, there is no partner with Him, His is the sovereignty and His is the praise and He is Potent over everything. (We are) returning, repenting, worshipping, prostrating before our Lord, and we praise Him Allah fulfilled His promise and helped His servant, and routed the confederates alone.
This hadith has been narrated on the authority of Ibn Umar through another chain of transmitters (but with one alteration) that here Allah-o-Akbar is mentioned twice.
Anas b. Malik (Allah be pleased with him) reported
I and Abu Talha (both) came back along with Allah's Apostle (ﷺ). Safiyyah (the wife of the Holy Prophet) rode behind him on his camel and as we came to the out- skirts of Medina he said: (We are those) who return, who repent, who worship our Lord, who praise (Him), and he went on uttering this until we entered Medina.
A hadith like this has been narrated by Anas b. Malik (Allah be pleased with him) through another chain of transmitters.