Abdullah bin Masud reported,

The Messenger of Allah ﷺ said, "The blood of a Muslim who testifies that there is no god but Allah and that I am the Messenger of Allah is not lawful to shed except in one of three cases: a life for a life, a married person who commits adultery, and one who abandons his religion and forsakes the community."

Azami 7028

Sahih

عن عبد الله بن مسعود قال

قال رسول الله ﷺ: ((لا يحل دم امرئ مسلم يشهد أن لا إله إلا الله وأني رسول الله إلا بإحدى ثلاث: النفس بالنفس، والثيب الزاني، والمفارق لدينه التارك للجماعة)).

الأعظمي 7028صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Apostate, those who wage war, and whoever insults the Messenger
Section
Ruling on the male apostate and female apostate and seeking their repentance
Numbering
Jami al-Kamil 7028 (2nd edition)
Azami 7028