حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا أَبُو الأَحْوَصِ، حَدَّثَنَا أَبُو إِسْحَاقَ الْهَمْدَانِيُّ، عَنْ عَلِيِّ بْنِ رَبِيعَةَ، قَالَ شَهِدْتُ عَلِيًّا - رضى الله عنه - وَأُتِيَ بِدَابَّةٍ لِيَرْكَبَهَا فَلَمَّا وَضَعَ رِجْلَهُ فِي الرِّكَابِ قَالَ بِسْمِ اللَّهِ فَلَمَّا اسْتَوَى عَلَى ظَهْرِهَا قَالَ الْحَمْدُ لِلَّهِ ثُمَّ قَالَ ‏ end actual hadith container 5‏ ثُمَّ قَالَ الْحَمْدُ لِلَّهِ ‏.‏ ثَلاَثَ مَرَّاتٍ ‏.‏ ثُمَّ قَالَ اللَّهُ أَكْبَرُ ‏.‏ ثَلاَثَ مَرَّاتٍ ثُمَّ قَالَ سُبْحَانَكَ إِنِّي ظَلَمْتُ نَفْسِي فَاغْفِرْ لِي فَإِنَّهُ لاَ يَغْفِرُ الذُّنُوبَ إِلاَّ أَنْتَ ‏.‏ ثُمَّ ضَحِكَ فَقِيلَ يَا أَمِيرَ الْمُؤْمِنِينَ مِنْ أَىِّ شَىْءٍ ضَحِكْتَ قَالَ رَأَيْتُ النَّبِيَّ صلى الله عليه وسلم فَعَلَ كَمَا فَعَلْتُ ثُمَّ ضَحِكَ فَقُلْتُ يَا رَسُولَ اللَّهِ مِنْ أَىِّ شَىْءٍ ضَحِكْتَ قَالَ ‏"‏ إِنَّ رَبَّكَ يَعْجَبُ مِنْ عَبْدِهِ إِذَا قَالَ اغْفِرْ لِي ذُنُوبِي يَعْلَمُ أَنَّهُ لاَ يَغْفِرُ الذُّنُوبَ غَيْرِي ‏"‏ ‏.‏

Narrated Ali ibn AbuTalib: Ali ibn Rabi'ah said: I was present with Ali while a beast was brought to him to ride. When he put his foot in the stirrup, he said: "In the name of Allah." Then when he sat on its back, he said: "Praise be to Allah." He then said: "Glory be to Him Who has made this subservient to us, for we had not the strength, and to our Lord do we return." He then said: "Praise be to Allah (thrice); Allah is Most Great (thrice): glory be to Thee, I have wronged myself, so forgive me, for only Thou forgivest sins." He then laughed. He was asked: At what did you laugh? He replied: I saw the Messenger of Allah (PBUH) do as I have done, and laugh after that. I asked: Messenger of Allah , at what are you laughing? He replied: Your Lord, Most High, is pleased with His servant when he says: "Forgive me my sins." He know that no one forgives sins except Him. Translation Not Available

Book Ref: Sunan Abi Dawud Book 15 Hadith 2602
Web Ref:  Sunan Abi Dawud Book 14 Hadith 2596