It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Prophet (peace and blessings of Allah be upon him) said: "Whoever withdraws his hand from obedience to the rightful ruler of the time, no argument will be accepted from him on the Day of Resurrection, and whoever dies having separated from the community, he dies the death of ignorance."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 5386
Hadith Gradingحکم دارالسلام:حديث صحيح ، وهذا إسناد حسن .