Sahih Muslim, Book 54, Hadith 19 (Muslim 7165)

Ahnaf b. Qais reported on the authority of Abu Bakra that Allah's Messenger (ﷺ) said:

When two Muslims confront each other with their swords, both the slayer and the slain are doomed to Hell-Fire.