Mishkat al-Masabih 2434
وَعَنْ عَلِيٍّ: أَنَّهُ أُتِيَ بِدَابَّةٍ لِيَرْكَبَهَا فَلَمَّا وضَعَ رِجْلَه فِي الركابِ قَالَ: بسمِ اللَّهِ فَلَمَّا اسْتَوَى عَلَى ظَهْرِهَا قَالَ: الْحَمْدُ لِلَّهِ ثُمَّ قَالَ: (سُبْحَانَ الَّذِي سَخَّرَ لَنَا هَذَا وَمَا كُنَّا لَهُ مُقْرِنِينَ وَإِنَّا إِلَى رَبنَا لمنُقلِبون) ثُمَّ قَالَ: الْحَمْدُ لِلَّهِ ثَلَاثًا وَاللَّهُ أَكْبَرُ ثَلَاثًا سُبْحَانَكَ إِنِّي ظَلَمْتُ نَفْسِي فَاغْفِرْ لِي فَإِنَّهُ لَا يَغْفِرُ الذُّنُوبَ إِلَّا أَنْتَ ثُمَّ ضَحِكَ فَقِيلَ: مِنْ أَيِّ شَيْءٍ ضَحِكْتَ يَا أَمِيرَ الْمُؤْمِنِينَ؟ قَالَ: رَأَيْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ صَنَعَ كَمَا صَنَعْتُ ثُمَّ ضَحِكَ فَقُلْتُ: مِنْ أَيِّ شَيْءٍ ضَحِكْتَ يَا رَسُولَ اللَّهِ؟ قَالَ: إِنَّ رَبَّكَ لَيَعْجَبُ مِنْ عَبْدِهِ إِذَا قَالَ: رَبِّ اغْفِرْ لِي ذُنُوبِي يَقُولُ: يَعْلَمُ أَنَّهُ لَا يَغْفِرُ الذُّنُوبَ غَيْرِي رَوَاهُ أَحْمد وَالتِّرْمِذِيّ وَأَبُو دَاوُد
From ʿAli: A mount was brought to him for him to ride. When he put his foot in the stirrup, he said: "In the name of Allah." When he settled on its back, he said: "Praise be to Allah." Then he said: "Glorified is He who has subjected this to us, and we could not have done it ourselves, and indeed to our Lord we will return." Then he said: "Praise be to Allah" three times, and "Allah is the Greatest" three times, "Glorified are You; I have wronged myself, so forgive me, for none forgives sins but You." Then he laughed. It was said: "What did you laugh at, O Commander of the Believers?" He said: "I saw the Messenger of Allah ﷺ do as I did, then he laughed, and I said: 'What did you laugh at, O Messenger of Allah?' He said: 'Your Lord is pleased with His servant when he says: My Lord, forgive me my sins. He says: He knows that none forgives sins but Me.'" Reported by Ahmad, at-Tirmidhi and Abu Dawud.