An-Nawawi's 40 Hadith, Book 1, Hadith 14 (Nawawi 40 14)

On the authority of Ibn Masood (may Allah be pleased with him) who said:

The Messenger of Allah (peace and blessings of Allah be upon him) said, “It is not permissible to spill the blood of a Muslim except in three : the married person who commits adultery, a life for a life, and the one who forsakes his religion and separates from the community.”