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 Messenger of Allah ﷺ forbade it, saying, 'Do not punish anybody with Allah's punishment (fire).' I would have killed them according to the statement of Messenger of Allah ﷺ, 'Whoever changed his Islamic religion, then kill him.'"
لَوْ كُنْتُ أَنَا لَمْ أُحْرِقْهُمْ لِنَهْىِ رَسُولِ اللَّهِ ﷺ وَلَقَتَلْتُهُمْ لِقَوْلِ رَسُولِ اللَّهِ ﷺ مَنْ بَدَّلَ دِينَهُ فَاقْتُلُوهُ