Ikrima reported,

Ali رضي الله عنه burned a group of people. When this reached Ibn Abbas, he said, "Had it been me, I would not have burned them, because the Prophet ﷺ said, 'Do not punish with the punishment of Allah.' But I would have killed them, as the Prophet ﷺ said, 'Whoever changes his religion, kill him.'"

Bukhari 3017

Sahih

حدثنا علي بن عبد الله حدثنا سفيان عن أيوب

عن عكرمة

أن عليا رضي الله عنه حرق قوما فبلغ ابن عباس فقال لو كنت أنا لم أحرقهم لأن النبي ﷺ قال لا تعذبوا بعذاب الله ولقتلتهم كما قال النبي ﷺ من بدل دينه فاقتلوه

البخاري 3017صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
None shall punish with the punishment of Allah
Numbering
Darussalam 3017
Bukhari 3017