I say: This is a weak chain of transmission. Subayʿ—who is Ibn Khālid al-Yashkurī—was narrated from by a number of trustworthy transmitters. Ibn Ḥibbān listed him in al-Thiqāt (1/82), and al-ʿIjlī likewise declared him trustworthy, as stated in al-Tahdhīb. However, I have not seen him in Tartīb Thiqāt al-ʿIjlī by al-Ḥāfiẓ al-Haythamī. Al-Ḥāfiẓ said in al-Taqrīb: “Acceptable”—that is, when corroborated. Ṣakhr ibn Badr al-ʿIjlī is unknown. Al-Dhahabī said: “No one other than Abū al-Tayyāḥ al-Ḍubaʿī narrated from him.”
I say: However, Naṣr ibn ʿĀṣim al-Laythī corroborated him, narrating from Khālid something similar, which includes: “If Allah has a caliph on earth that day who flogs your back and takes your wealth, then adhere to him.” It was narrated by Abū Dāwūd (4244 and 4245) and Aḥmad.
I say: This is a good chain of transmission, for the narrators after Khālid are trustworthy narrators of Muslim. It is therefore sounder than Ṣakhr ibn Badr’s report, which contains the expression “the Caliph of Allah.” Shaykh al-Islām Ibn Taymiyyah, may Allah Most High have mercy on him, considered this addition objectionable. Yet, if it were authentically established from the Messenger of Allah, may Allah’s blessings and peace be upon him, we would not be concerned with his objection.
The final portion of the hadith has another route, from ʿAbd al-Raḥmān ibn Qurṭ, from Ḥudhayfah ibn al-Yamān, with the wording: “There will be tribulations, at whose gates will be callers to the Fire. For you to die while clinging with your teeth to the stump of a tree is better for you than following any one of them.” Ibn Mājah narrated it (3981). However, this Ibn Qurṭ is unknown.