Mishkat al-Masabih 2425
وَعَنِ ابْنِ عُمَرَ قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا قَفَلَ مِنْ غَزْوٍ أَوْ حَجٍّ أَوْ عُمْرَةٍ يُكَبِّرُ عَلَى كُلِّ شَرَفٍ مِنَ الْأَرْضِ ثَلَاثَ تَكْبِيرَاتٍ ثُمَّ يَقُولُ: «لَا إِلَهَ إِلَّا اللَّهُ وَحْدَهُ لَا شَرِيكَ لَهُ لَهُ الْمُلْكُ وَلَهُ الْحَمْدُ وَهُوَ عَلَى كلِّ شيءٍ قديرٌ آيِبونَ تَائِبُونَ عَابِدُونَ سَاجِدُونَ لِرَبِّنَا حَامِدُونَ صَدَقَ اللَّهُ وَعْدَهُ وَنَصَرَ عَبْدَهُ وَهَزَمَ الْأَحْزَابَ وَحْدَهُ»
From Ibn ʿUmar, who said: When the Messenger of Allah ﷺ returned from a military expedition, Hajj or ʿUmrah, he would say Allahu akbar three times on every rise in the ground, then say: "There is no god but Allah alone, with no partner; His is the dominion and His is the praise, and He has power over all things. Returning, repenting, worshipping, prostrating, and praising our Lord. Allah has fulfilled His promise, helped His servant and defeated the confederates alone."