Sahih Muslim, Book 1, Hadith 186 (Muslim 277)

It is narrated on the authority of Abdullah b. Umar who narrates from the Prophet of Allah (ﷺ) who said:

He who took up arms against us is not of us.