I came to Abdullah bin Amr bin As while he was sitting in the shade of the Kaabah with people gathered around him, and I heard him say:While we were with the Messenger of Allah ﷺ on a journey, he stopped at a place to camp. Some of us were pitching tents, some were practicing archery, and some were tending to the grazing animals, when his caller announced, "The prayer is gathering."We assembled, and the Messenger of Allah ﷺ stood and addressed us, saying, "There has been no prophet before me except that it was his duty to guide his community to what he knew was good for them and to warn them against what he knew was evil for them. This community of yours has been granted its well-being in its earlier generations, while its later generations will be afflicted by trials and matters they will find detestable. Then trials will come, one making the next seem light by comparison, so the believer will say, 'This will be my destruction,' then it will pass. Then another trial will come and the believer will say, 'This will be my destruction,' then it will pass. So whoever wishes to be removed from the Fire and admitted to Paradise, let his death come to him while he believes in Allah and the Last Day, and let him treat people the way he would love to be treated. Whoever pledges allegiance to a leader, giving him the clasp of his hand and the sincerity of his heart, let him obey him to the best of his ability. If another comes disputing his authority, then strike the neck of the latter."I pushed my head through the crowd and said, "I implore you by Allah, did you hear this from the Messenger of Allah ﷺ yourself?"He pointed with his hand to his ears and said, "My ears heard it, and my heart retained it."
حدثنا أبو كريب حدثنا أبو معاوية وعبد الرحمن المحاربي ووكيع عن الأعمش عن زيد بن وهب
انتهيت إلى عبد الله بن عمرو بن العاص وهو جالس في ظل الكعبة والناس مجتمعون عليه فسمعته يقول بينا نحن مع رسول الله ﷺ في سفر إذ نزل منزلا فمنا من يضرب خباءه ومنا من ينتضل ومنا من هو في جشره إذ نادى مناديه الصلاة جامعة فاجتمعنا فقام رسول الله ﷺ فخطبنا فقال إنه لم يكن نبي قبلي إلا كان حقا عليه أن يدل أمته على ما يعلمه خيرا لهم وينذرهم ما يعلمه شرا لهم وإن أمتكم هذه جعلت عافيتها في أولها وإن آخرهم يصيبهم بلاء وأمور ينكرونها ثم تجيء فتن يرقق بعضها بعضا فيقول المؤمن هذه مهلكتي ثم تنكشف ثم تجيء فتنة فيقول المؤمن هذه مهلكتي ثم تنكشف فمن سره أن يزحزح عن النار ويدخل الجنة فلتدركه موتته وهو يؤمن بالله واليوم الآخر وليأت إلى الناس الذي يحب أن يأتوا إليه ومن بايع إماما فأعطاه صفقة يمينه وثمرة قلبه فليطعه ما استطاع فإن جاء آخر ينازعه فاضربوا عنق الآخر قال فأدخلت رأسي من بين الناس فقلت أنشدك الله أنت سمعت هذا من رسول الله ﷺ قال فأشار بيده إلى أذنيه فقال سمعته أذناي ووعاه قلبي
Reported by Muslim, Emirate, chapter on the obligation of fulfilling the pledge given to caliphs, the first one and then the next, h:1844, from Abu Kurayb through this chain.