The Prophet ﷺ said, "Whoever takes up arms against us is not one of us."
أخبرنا أحمد بن عمرو بن السرح قال أنبأنا ابن وهب قال أخبرني مالك وعبد الله بن عمر وأسامة بن زيد ويونس بن يزيد أن نافعا أخبرهم
أن النبي ﷺ قال من حمل علينا السلاح فليس منا
Bukhari narrated it in Fitan, in the chapter "The saying of the Prophet, 'Whoever bears arms against us is not one of us'," hadith no. 7070, and Muslim in Iman, in a chapter similar to that of Bukhari, hadith no. 98, from the hadith of Malik through this route, and it is in Kubra, hadith no. 3563.