The Messenger of Allah [SAW] said: "It is not permissible to shed the blood of a Muslim except in three cases: An adulterer who had been married, who should be stoned to death; a man who killed another man intentionally, who should be killed; and a man who left Islam and waged war against Allah, the Might and Sublime, and His Messenger, who should be killed, or crucified, or banished from the land." (Using translation from Nasāʾī 4048)
أَنَّ رَسُولَ اللهِ ﷺ قَالَ لَا يَحِلُّ دَمَ امْرِئٍ مُسْلِمٍ إِلَّا بِإِحْدَى ثَلَاثِ خِصَالٍ زَانٍ مِحْصَنٌ يُرْجَمُ أَوْ رَجُلٌ قَتَلَ رَجُلًا مُتَعَمِّدًا فَيُقْتَلُ أَوْ رَجُلٌ يَخْرُجُ مِنَ الْإِسْلَامِ لِيُحَارِبَ اللهَ ﷻّ وَرَسُولَهُ فَيُقْتَلُ أَوْ يُصْلَبُ أَوْ يُنْفَى مِنَ الْأَرْضِ