The Qur'an says that Allah curses the one who harms the Prophet in this world and He connected harm of Himself to harm of the Prophet. There is no dispute that anyone who curses Allah is killed and that his curse demands that he be categorised as an unbeliever. The judgement of the unbeliever is that he is killed.
Allah says, "Those who harm Allah and His Messenger, Allah has cursed them in this world and in the Next, and has prepared for them a humiliating punishment." (33:57). He said something similar about those who kill the believers. Part of the curse on them in this world is that they are killed. Allah says, "Cursed they will be. Wherever they are found, they are seized and all slain." (33: 61) He mentions the punishment of those who fight, "That is humiliation in this world for them." (5:45) "Killing" (qatl) can have the meaning of "curse". Allah says, "May the conjecturers be killed!" (51:11) and "May Allah fight them! How they are perverted!" (9:30) i.e. may Allah curse them.
This is because there is a difference between their harming Allah and His Messenger and harming the believers. Injuring the believers, short of murder, incurs beating and exemplary punishment. The judgement against those who harm Allah and His Prophet is more severe - the death penalty.