Ikrima reported,

Ali ﷺ burned a group of people, and news of this reached Ibn Abbas, who said, "Had it been me, I would not have burned them, because the Prophet ﷺ said, 'Do not punish with the punishment of Allah.' Instead, I would have killed them, as the Prophet ﷺ said, 'Whoever changes his religion, kill him.'"

Azami 7909

Sahih

عن عكرمة

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

الأعظمي 7909صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Prohibition of torturing with fire
Numbering
Jami al-Kamil 7909 (2nd edition)
Azami 7909