Nafi reported,

He said that when the people of Madinah renounced their allegiance to Yazid bin Muawiya, Ibn Umar gathered his household and his children and said, "I heard the Prophet ﷺ say, 'A banner will be raised for every traitor on the Day of Resurrection.' We have pledged allegiance to this man on the terms set by Allah and His Messenger, and I know of no treachery greater than for a man to pledge allegiance on the terms set by Allah and His Messenger, and then take up arms against him. I warn you, if I learn that any one of you has renounced his allegiance to him or pledged allegiance to anyone else in this matter, that will be the parting between me and him."

Azami 7661

Sahih

عن نافع

قال لما خلع أهل المدينة يزيد بن معاوية جمع ابن عمر حشمه وولده فقال إني سمعت النبي ﷺ يقول: ينصب لكل غادر لواء يوم القيامة… وإنا قد بايعنا هذا الرجل على بيع الله ورسوله، وإني لا أعلم غدرا أعظم من أن يبايع رجل على بيع الله ورسوله، ثم ينصب له القتال، وإني لا أعلم أحدا منكم خلعه، ولا بايع في هذا الأمر، إلا كانت الفيصل بيني وبينه.

الأعظمي 7661صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Breaking the pledge of allegiance, discouragement from
Numbering
Jami al-Kamil 7661 (2nd edition)
Azami 7661