Sahih Bukhari – Hadith No : 7008

Narrated `Ikrima: Some Zanadiqa (atheists) were brought to `Ali and he burnt them. The news of this event, reached Ibn `Abbas who said, “If I had been in his place, I would not have burnt them, as Allah’s Apostle forbade it, saying, ‘Do not punish anybody with Allah’s punishment (fire).’ I would have killed them according to the statement of Allah’s Apostle, ‘Whoever changed his Islamic religion, then kill him.'”

Hadith In Arabic Text :

حدثنا أبو النعمان، محمد بن الفضل حدثنا حماد بن زيد، عن أيوب، عن عكرمة، قال أتي علي رضى الله عنه بزنادقة فأحرقهم فبلغ ذلك ابن عباس فقال لو كنت أنا لم أحرقهم لنهى رسول الله صلى الله عليه وسلم ولقتلتهم لقول رسول الله صلى الله عليه وسلم ‏”‏ من بدل دينه فاقتلوه ‏”‏‏.‏

Chapter : Dealing with Apostates – كتاب استتابة المرتدين والمعاندين وقتالهم