Yahya related to me from Malik from Nafi from Abdullah ibn Umar that when the Messenger of Allah ﷺ returned from a military expedition or a hajj or an umra, he used to say three takbirs on every elevated part of the land, and then he used to say, "There is no god but Allah, alone, without partner. To Him belongs the Kingdom and to Him belongs the praise and He has power over everything. Returning, making tawba, serving, prostrating, praising our Lord. Allah has promised truly and given His slave victory and defeated the tribes alone."
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا قَفَلَ مِنْ غَزْوٍ أَوْ حَجٍّ أَوْ عُمْرَةٍ يُكَبِّرُ عَلَى كُلِّ شَرَفٍ مِنَ الأَرْضِ ثَلاَثَ تَكْبِيرَاتٍ ثُمَّ يَقُولُ لاَ إِلَهَ إِلاَّ اللَّهُ وَحْدَهُ لاَ شَرِيكَ لَهُ لَهُ الْمُلْكُ وَلَهُ الْحَمْدُ وَهُوَ عَلَى كُلِّ شَىْءٍ قَدِيرٌ آيِبُونَ تَائِبُونَ عَابِدُونَ سَاجِدُونَ لِرَبِّنَا حَامِدُونَ صَدَقَ اللَّهُ وَعْدَهُ وَنَصَرَ عَبْدَهُ وَهَزَمَ الأَحْزَابَ وَحْدَهُ