Sahih al-Bukhari 7111
Sulaiman bin Harb narrated to us that Hammad bin Zaid told us. He narrated from Ayyub, and Ayyub from Nafi'. Nafi' said: When the people of Medina decided to withdraw from (the Khilafat of) Yazid bin Mu'awiyah, Hazrat Ibn Umar (ra) gathered his servants and his sons and said: I heard the Prophet (saw) say: “On the Day of Resurrection a flag will be set up for every treacherous person.” And look, we pledged allegiance to this man in accordance with the pledge of Allah and His Messenger, and I know of no treachery greater than that a man is given allegiance in accordance with the pledge of Allah and His Messenger and then war is started against him. And whoever of you I come to know has withdrawn from the Khilafat, or has pledged allegiance to someone else in this matter, there will be separation between me and him.
AI-translated by Islam-Today