Narrated Abu Huraira
Allah's Messenger (ﷺ) sent us in a mission (i.e., an army-unit) and said, "If you find so-and-so and so-and-so, burn both of them with fire." When we intended to depart, Allah's Messenger (ﷺ) said, "I have ordered you to burn so-and-so and so-and-so, and it is none but Allah Who punishes with fire, so, if you find them, kill them (i.e., don't burn them)."
Narrated `Ikrima
`Ali burnt some people and this news reached Ibn `Abbas, who said, "Had I been in his place I would not have burnt them, as the Prophet (ﷺ) said, 'Don't punish (anybody) with Allah's Punishment.' No doubt, I would have killed them, for the Prophet (ﷺ) said, 'If somebody (a Muslim) discards his religion, kill him.' "