Surah 5

Surah 5:33

"The penalty (for) those who wage war (against) God and His messenger, and who strive in fomenting corruption on the earth, is that they be killed or crucified, or their hands and feet on opposite sides be cut off, or they be banished from the earth. That is a disgrace for them in this world, and in the Hereafter (there will be) a great punishment for them,"

5.33 – The penalty (for) those who wage war (against) God and His messenger
Given that in the previous verses Abel says that he will not kill Cain even if Cain stretches out his hand to kill Abel and that verse 32 seems an encouragement not to kill, it is certainly striking that the very next verse prescribes killing or crucifixion. This verse associates the messenger with Allah in response to conflict.
Al-Wāqidī (d. 823) suggested a particular occasion for the recitation of this verse in his Kitāb al-maghāzī. He wrote that the messenger of Islam prescribes this punishment for a group of men from ‘Urayna who steal the messenger’s camels and kill his patron (Raids, 280).

- from The Quran with Christian Commentary: A Guide to Understanding the Scripture of Islam