(6) باب مَا يُبَاحُ بِهِ دَمُ الْمُسْلِمِ
'Abdullah (b. Mas'ud) reported:
Allah's Messenger (ﷺ) stood up and said: By Him besides Whom there is no god but He, the blood of a Muslim who bears the testimony that there is no god but Allah, and I am His Messenger, may be lawfully shed only in case of three persons: the one who abandons Islam, and deserts the community [Ahmad, one of the narrators, is doubtful whether the Prophet (ﷺ) used the word li'l-jama'ah or al-jama'ah), and the married adulterer, and life for life.
Reference: Sahih Muslim 1676 c
In-book reference: Book 28, Hadith 36
USC-MSA web (English) reference(deprecated numbering scheme): Book 16, Hadith 4154