Who is the Messiah referred to in Daniel 9:25?
According to the Jewish commentators, in both of these occurrences, “messiah” (“anointed one”) refers to a king. In v.25 it refers to King Cyrus of Persia, who is called “G-d’s anointed one” in Isaiah 45:1, and who gave orders to rebuild the Temple; this happened about seven seven-year periods (“sabbaths”, i.e. sabbatical years) after the First Temple had been destroyed. The Second Temple stood for about 60 “sabbaths”, after which it too was destroyed and the last Jewish king, Agrippa, was killed; this is the reference in v.26. It’s clear that these verses are talking about the rebuilding and re-destruction of Jerusalem; it therefore makes sense that the “anointed ones” referred to in these verses are kings.
