Sayyiduna Abdullah (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "It is not lawful to shed the blood of any Muslim except for one of three reasons: a married adulterer, by way of retaliation (qisas), or one who apostatizes and leaves the community."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17317
Abu al-Zinad (may Allah have mercy on him) said that a governor of Umar bin Abd al-Aziz (may Allah have mercy on him) caught some highway robbers and wanted to kill them, but then he wrote to Umar bin Abd al-Aziz (may Allah have mercy on him), who replied: Deal with them in a lighter way than that; and he forbade killing them.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17318