Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings of Allah be upon him) said: "The blood of any man who testifies that there is no god but Allah and that I am the Messenger of Allah is not lawful, except in three cases (even if he is a Muslim): a life for a life, a married adulterer, and one who leaves his religion and separates from the community of Muslims."
Hadith Referenceسنن دارمي / من كتاب الاحدود / 2335
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده صحيح والحديث متفق عليه، [مكتبه الشامله نمبر: 2344]