Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
abudawud:4248Musaddad > ʿĪsá b. Yūnus > al-Aʿmash > Zayd b. Wahb > ʿAbd al-Raḥman b. ʿAbd Rab al-Kaʿbah > ʿAbdullāh b. ʿAmr

The Prophet ﷺ as saying: If a man takes an oath of allegiance to a leader, and puts his hand on his hand and does it with the sincerity of his heart, he should obey him as much as possible. If another man comes and contests him, then behead the other one. The narrator 'Abd al-Rahman said: I asked: Have you heard this from the Messenger of Allah ? He said: My ears heard it and my heart retained it. I said: Your cousin Mu'awiyah orders us that we should do this and do that. He replied: Obey him in the acts of obedience to Allah, and disobey him in the acts of disobedience to Allah.  

أبو داود:٤٢٤٨حَدَّثَنَا مُسَدَّدٌ حَدَّثَنَا عِيسَى بْنُ يُونُسَ حَدَّثَنَا الأَعْمَشُ عَنْ زَيْدِ بْنِ وَهْبٍ عَنْ عَبْدِ الرَّحْمَنِ بْنِ عَبْدِ رَبِّ الْكَعْبَةِ عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو

أَنَّ النَّبِيَّ ﷺ قَالَ مَنْ بَايَعَ إِمَامًا فَأَعْطَاهُ صَفْقَةَ يَدِهِ وَثَمَرَةَ قَلْبِهِ فَلْيُطِعْهُ مَا اسْتَطَاعَ فَإِنْ جَاءَ آخَرُ يُنَازِعُهُ فَاضْرِبُوا رَقَبَةَ الآخَرِ قُلْتُ أَنْتَ سَمِعْتَ هَذَا مِنْ رَسُولِ اللَّهِ ﷺ قَالَ سَمِعَتْهُ أُذُنَاىَ وَوَعَاهُ قَلْبِي قُلْتُ هَذَا ابْنُ عَمِّكَ مُعَاوِيَةُ يَأْمُرُنَا أَنْ نَفْعَلَ وَنَفْعَلَ قَالَ أَطِعْهُ فِي طَاعَةِ اللَّهِ وَاعْصِهِ فِي مَعْصِيَةِ اللَّهِ