The Prophet ﷺ said, "Woe to you," or "woe upon you, do not revert to disbelief after me, striking the necks of one another."
عن النبي ﷺ قال: ويلكم أو ويحكم، لا ترجعوا بعدي كفارا، يضرب بعضكم رقاب بعض.
Bukhari narrated it in Adab (6166) and Muslim in Iman (66), both from the hadith of Shubah, from Waqid bin Muhammad, that he heard his father narrate from Abdullah bin Umar, and he mentioned the hadith, and their wording is identical.