How would God allow His prophet to die such a horrible death?
The Quran is reluctant to admit that he could have been slain by his enemies, whereas there is no difficulty in admitting that other prophets were slain (2. 61, 91), even Muhammad’s death is discussed (3.144).
Surah 2:91. When it is said to them, “Believe in what Allah Hath sent down, “they say, “We believe in what was sent down to us:” yet they reject all besides, even if it be Truth confirming what is with them. Say: “Why then have ye slain the prophets of Allah in times gone by, if ye did indeed believe?”
Surah 3:112. Shame is pitched over them (Like a tent) wherever they are found, except when under a covenant (of protection) from Allah and from men; they draw on themselves wrath from Allah, and pitched over them is (the tent of) destitution. This because they rejected the Signs of Allah, and slew the prophets in defiance of right; this because they rebelled and transgressed beyond bounds.
Surah: 5. Maida Ayah: 17
17. They indeed have disbelieved who say: Lo! Allah is the Messiah, son of Mary.
Say: Who then can do aught against Allah, if He had willed to destroy the Messiah son of Mary,
and his mother and everyone on earth? Allah’s is the Sovereignty of the heavens and the earth and all that is between them. He createth what He will. And Allah is Able to do all things. (Pickthall translation)
God has the right to permit His messengers to be killed because He is the Sovereign God and He works His plan.
The Bible teaches that God will save His anointed, Jesus.
(Psa 20:6 NIV) Now I know that the LORD saves his anointed; he answers him from his holy heaven with the saving power of his right hand.
Christian response
This verse does not teach that God will save Jesus so that he did not have to die. It is simply a Psalm of David to sing of how God will save His people.
(Psa 20:1-5 NIV) For the director of music. A psalm of David. May the LORD answer you when you are in distress; may the name of the God of Jacob protect you. {2} May he send you help from the sanctuary and grant you support from Zion. {3} May he remember all your sacrifices and accept your burnt offerings. Selah {4} May he give you the desire of your heart and make all your plans succeed. {5} We will shout for joy when you are victorious and will lift up our banners in the name of our God. May the LORD grant all your requests.
Jesus could not have died a cursed death on the cross.
The Bible describes crucifixion as a cursed form of death. How could Jesus, a righteous messenger of God, die an accursed death?
(Deu 21:23) you must not leave his body on the tree overnight. Be sure to bury him that same day, because anyone who is hung on a tree is under God’s curse. You must not desecrate the land the LORD your God is giving you as an inheritance.
Christians believe that if Jesus were to atone for our sins, the only way for him to die would be an accursed one. The Bible talks about Jesus, taking our sins upon himself, and as a result naturally came under God’s curse.
(Isa 53:3-6) He was despised and rejected by men, a man of sorrows, and familiar with suffering. Like one from whom men hide their faces he was despised, and we esteemed him not. {4} Surely he took up our infirmities and carried our sorrows, yet we considered him stricken by God, smitten by him, and afflicted. {5} But he was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. {6} We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all.
Jesus, during his last minutes on the cross, cried out in agony as his father forsook him because of all the sins that he bore for mankind.
(Mat 27:46) About the ninth hour Jesus cried out in a loud voice, “Eloi, Eloi, lama sabachthani?”–which means, “My God, my God, why have you forsaken me?”