Sunan Abi Dawud, Book 42, Hadith 13 (Abu Dawud 4610)

‘Abd Allah b. Mas’ud reported the Prophet (ﷺ) as saying:

"Beware! The extremists perished," saying it three times.