"As it is written", used throughout the New Testament, always refers to Old Testament scripture. Jesus fulfilled all prophecy concerning the suffering Messiah.