An Nawawi Hadith Number 014 : Narrated By Abdullah bin Masud

The messenger of Allah said : "The blood of a Muslim may not be legally spilt other than in one of three [instances] : the married person who commits adultery; a life for a life; and one who forsakes his religion and abandons the community."

Reporters.
Related by Bukhari and Muslim.