Please read the supplementary material listed below for this section first before proceeding to the highlights in the commentary that follows, which gives some additional details not thoroughly covered in the supplementary reading.
Verses 36-39 of Daniel 11 appear to show the Roman emperor, as the next king of the North, proclaiming himself divine and later honoring and expanding the power of a previously unrecognized "god" in a high religious office, the former occurring early in the succession of Roman emperors and the latter commencing with Constantine the Great in the fourth century A.D. The honoring of this false religion would progress through various resurrections of the western part of the Roman Empire until the end time. This "god" seems parallel to the "little horn" of Daniel 7, which appears to be the Roman papacy.
Yet has anyone actually ever looked on the pope as a god? Consider that the pope is called "Holy Father"—the name of God the Father (John 17:11; compare Matthew 23:9)—as well as the "Vicar of Christ," meaning substitute for Christ. According to one Catholic publication, "all the names which are attributed to Christ in Scripture, implying His supremacy over the church, are also attributed to the Pope" (Bellamin, On the Authority of Councils, Book 2, chap. 17, quoted by A. Jan Marcussen, National Sunday Law, 58th ed., p. 77). He has been called "another God on earth" (Labbe and Cossart, History of the Councils, Vol. 14, col. 109) and "our Lord God the Pope" (Extravagantes of Pope John XXII, title 14, chap. 4, Declaramus, quoted by Marcussen, p. 77). Furthermore, Catholic teaching has in the past claimed that "the Pope is not only the representative of Jesus Christ, but he IS Jesus Christ, hidden under a veil of flesh" (The Catholic National, July 1895). All of this is a forerunner to the blasphemy of the end time, when, as the apostle Paul foretold, the leader of the false religious system will sit "as God in the temple of God, showing himself that he is God" (2 Thessalonians 2:4).
Verses 40-45 detail events of the end time, where the European beast power of the north is ultimately brought to his end at Christ's return.
In Daniel 12:1, the events of the last days are related to the unparalleled "time of trouble," synonymous with "Jacob's trouble" in Jeremiah 30:7 and the "great tribulation" of Matthew 24:21. After this will come the resurrection (Daniel 12:1-3). Some are resurrected to everlasting life and some to shame and everlasting contempt (verse 2). It is important to note that this does not say that those raised to life and those raised to contempt are all raised at the same time. From other passages, it is evident that these are different resurrections.
Daniel is then told to seal up the scroll of his book, the understanding of which would not be unlocked until the end time (verse 4). The work of his long life is at last done. But then we are told of two more angels in addition to the first. Apparently they have been listening to this amazing prophecy. One asks how long it would be to the end of "these wonders"—evidently the final trials ending in the resurrection (verses 5-6). Notice the answer: "It shall be for a time, times, and a half. And when they have made an end of scattering the power of the holy people, all these things shall be finished" (verse 7, Green's Literal Translation). This ties directly back to the prophecy of Daniel 7, where it was said that the saints would be given into the hands of the persecuting "little horn" for this exact same period (7:25)—which, as was explained in the comments on that verse, equates to three and a half years, the last three and a half years before Christ's return (equating also to the 1,260 days or 42 months of other prophecies in Revelation).
Daniel, however, is quite confused. Though he has been told to seal the prophecy, he still has questions. He asks how it's all going to work out (Daniel 12:8). The order to seal the prophecy is then reiterated (verse 9). Nevertheless, a few more things are told to him at this point—which Daniel may have found even more confusing. The angel explains that the wise of the end time would understand the time frame being described.
In verse 11, Daniel is specifically told that the time from the taking away of daily sacrifices and the setting up of the end-time abomination of desolation would be 1,290 days. Verse 12 then mentions an enigmatic 1,335 days. The key to understanding appears to be verse 13, where Daniel is told that he will rise to his inheritance "at the end of the days." This seems to mean the end of the various groupings of days mentioned. That is, the three and a half years (1,260 days), the 1,290 days and the 1,335 days all seem to end at the time Daniel is resurrected at Christ's return. A possible scenario is that breaking of the power of the saints—the cutting off of their public preaching—will come 1,335 days before Christ's return. Then, 45 days later, 1,290 days before Christ's return, the abomination of desolation will be set up. And then, 30 days later, 1,260 days before Christ's return, the Great Tribulation will commence. Thankfully, Christ will return in just three and a half years from this point to bring deliverance to the people of Israel and Judah (as the commencement of His deliverance of all mankind) and everlasting life to his saints. The dead in Christ will live again.
Daniel, whose time to rest came not long after the sealing of his prophecy, will at that future time be raised—but then, with all of us who remain faithful, to perfect understanding. At last, all of Daniel's questions will be answered—and, as amazing as it is to contemplate, so will all of ours.
Supplementary Reading: “War and Peace in the Middle East," The Middle East in Bible Prophecy, pages 25-32; “What Is the 'Abomination of Desolation'?," The Middle East in Bible Prophecy, pages 26-27; “Daniel 11 (NKJV) With Explanation," verses 36-45.