Abu Qilaba reported,

He was sitting behind Umar bin Abdul-Aziz when the people there began discussing a matter at length. They said, "The caliphs have carried out retaliation for it." Umar turned to Abu Qilaba, who was behind him, and asked, "What do you say, Abdullah bin Zayd?" Or he said, "What do you say, Abu Qilaba?"I replied, "I do not know of any soul whose killing is lawful in Islam except a man who commits adultery after marriage, or who kills a person without right, or who wages war against Allah and His Messenger ﷺ."Anbasa said, "Anas narrated to us such-and-such."I said, "It was to me that Anas narrated it." He said, "A group of people came to the Prophet ﷺ and spoke with him, saying, 'We have found this land unhealthy.' He said, 'Here are some camels of ours being sent out to pasture. Go out with them and drink from their milk and their urine.' So they went out with them and drank from their urine and milk and recovered their health. Then they attacked the herdsman, killed him, and drove off the camels. What punishment could be considered too severe for such people? They killed a person, waged war against Allah and His Messenger, and terrorized the Messenger of Allah ﷺ."Anbasa said, "Glory be to Allah."I said, "Do you doubt my word?"He said, "Anas narrated this very thing to us."He then said, "People of such-and-such, you will continue to enjoy good as long as this man, or someone like him, remains among you."

Bukhari 4610

Sahih

حدثنا علي بن عبد الله حدثنا محمد بن عبد الله الأنصاري حدثنا ابن عون قال حدثني سلمان أبو رجاء مولى أبي قلابة

عن أبي قلابة

أنه كان جالسا خلف عمر بن عبد العزيز فذكروا وذكروا فقالوا وقالوا قد أقادت بها الخلفاء فالتفت إلى أبي قلابة وهو خلف ظهره فقال ما تقول يا عبد الله بن زيد أو قال ما تقول يا أبا قلابة قلت ما علمت نفسا حل قتلها في الإسلام إلا رجل زنى بعد إحصان أو قتل نفسا بغير نفس أو حارب الله ورسوله ﷺ فقال عنبسة حدثنا أنس بكذا وكذا قلت إياي حدث أنس قال قدم قوم على النبي ﷺ فكلموه فقالوا قد استوخمنا هذه الأرض فقال هذه نعم لنا تخرج فاخرجوا فيها فاشربوا من ألبانها وأبوالها فخرجوا فيها فشربوا من أبوالها وألبانها واستصحوا ومالوا على الراعي فقتلوه واطردوا النعم فما يستبطأ من هؤلاء قتلوا النفس وحاربوا الله ورسوله وخوفوا رسول الله ﷺ فقال سبحان الله فقلت تتهمني قال حدثنا بهذا أنس قال وقال يا أهل كذا إنكم لن تزالوا بخير ما أبقي هذا فيكم أو مثل هذا

البخاري 4610صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
Punishment of those who wage war against Allah and His Messenger and strive to cause corruption in the land is that they be killed or crucified" to His saying "or be expelled from the land
Numbering
Darussalam 4610
Bukhari 4610