'Ali came to some people of Az-Zutt, who worshipped idols, and burned them. Ibn 'Abbas said: "But the Messenger of Allah [SAW] said: 'Whoever changes his religion, kill him.'" (Using translation from Nasāʾī 4065)
أَنَّ عَلِيًّا ؓ أُتِيَ بِنَاسٍ مِنَ الزُّطِّ يَعْبُدُونَ وَثَنًا فَحَرَّقَهُمْ بِالنَّارِ فَقَالَ ابْنُ عَبَّاسٍ إِنَّمَا قَالَ رَسُولُ اللهِ ﷺ مَنْ بَدَّلَ دِينَهُ فَاقْتُلُوهُ