Acts 2:23-33 Him, being delivered by the determined purpose and foreknowledge of God, you have taken by lawless hands, have crucified, and put to death; whom God raised up, having loosed the pains of death, because it was not possible that He should be held by it. For David says concerning Him: [' I foresaw the LORD always before my face,] [For He is at my right hand, that I may not be shaken.] [Therefore my heart rejoiced, and my tongue was glad;] [Moreover my flesh also will rest in hope.] [For You will not leave my soul in Hades,] [Nor will You allow Your Holy One to see] [corruption.] [You have made known to me the ways of life;] [You will make me full of joy in Your presence.'] "Men [and] brethren, let [me] speak freely to you of the patriarch David, that he is both dead and buried, and his tomb is with us to this day. Therefore, being a prophet, and knowing that God had sworn with an oath to him that of the fruit of his body, according to the flesh, He would raise up the Christ to sit on his throne, he, foreseeing this, spoke concerning the resurrection of the Christ, that His soul was not left in Hades, nor did His flesh see corruption. This Jesus God has raised up, of which we are all witnesses. Therefore being exalted to the right hand of God, and having received from the Father the promise of the Holy Spirit, He poured out this which you now see and hear.
David knew the Messiah would die and be raised.