Abdullah bin Amr bin As reported,

The Messenger of Allah ﷺ said, "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 contesting his authority, then strike the neck of the latter."

Ahmad 6501

Sahih

حدثنا أبو معاوية حدثنا الأعمش عن زيد بن وهب عن عبد الرحمن بن عبد رب الكعبة

عن عبد الله بن عمرو بن العاص قال

قال رسول الله ﷺ من بايع إماما فأعطاه صفقة يده وثمرة قلبه فليطعه ما استطاع فإن جاء آخر ينازعه فاضربوا عنق الآخر

أحمد 6501صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Amr bin As
Numbering
Darussalam 6501
Ahmad 6501