Al-Ḥākim recorded it (2/98–99) from Maysarah ibn Ḥabīb al-Nahdī, from al-Minhāl ibn ʿAmr, from ʿAlī ibn Rabīʿah, who said:
“Once, I was riding behind ʿAlī, may Allah be pleased with him. When he placed his foot in the stirrup, he said, ‘In the name of Allah.’ When he had settled upon the animal’s back, he said, ‘Praise be to Allah’ three times, and ‘Allah is Most Great’ three times, then:
‘Glory be to Him who has subjected this to us, though we could not have subdued it ourselves.’
He then said, ‘None has the right to be worshipped but You. Glory be to You. I have indeed wronged myself, so forgive me my sins; surely none forgives sins except You.’ Then he leaned to one side and laughed. I said, ‘Commander of the Believers, what makes you laugh?’ He replied, ‘I was once riding behind the Prophet, peace and blessings be upon him, and the Messenger of Allah, peace and blessings be upon him, did as I have done. So I asked him as you have asked me, and the Messenger of Allah, peace and blessings be upon him, said …’”
He then related it. Al-Ḥākim said: “This hadith is authentic according to Muslim’s criteria.” Al-Dhahabī agreed with him.
I say: Muslim did not narrate from this al-Nahdī; rather, only al-Bukhārī narrated from him in al-Adab al-Mufrad. Thus, it is authentic, but not according to Muslim’s criteria.
Abū Isḥāq al-Sabīʿī also followed him in narrating a shortened version from ʿAlī ibn Rabīʿah. It was recorded by Abū Dāwūd (2602), al-Tirmidhī (2/255–256), Aḥmad (1/97, 115, and 128), and Ibn al-Sunnī in ʿAmal al-Yawm wa al-Laylah (490), through various routes from him. Al-Tirmidhī said: “A good, authentic hadith.” That is what he said, although Abū Isḥāq became confused in his later years; Aḥmad’s wording is more complete.
Ibn al-Sunnī (493) also recorded it through the route of al-Ajlaḥ, from Abū Isḥāq, from al-Ḥārith, from ʿAlī ibn Abī Ṭālib, from the Prophet, in a similarly shortened form. Al-Ajlaḥ has some weakness.