“The Messenger of Allah (ﷺ) sent us on a campaign, and a Muslim man attacked an idolater man.” And he mentioned the Hadith and added: “And the earth cast him out. The Prophet (ﷺ) was told about that and he said: ‘The earth accepts those who are worse than him, but Allah wanted to show you how great is the sanctity of La ilaha illallah.’”
Sunan Ibn Majah Book 36, Hadith 5