The climax of 3 chapters of visions is the mindblowing vision of Michael, will has been likened to Christ or an archangel, some agent of God, announcing the end of the worst of tribulations for the people of God. We have the book with names written in it, the book of those who are God’s people. And we have the dramatic resurrection of the dead, the earth shaking and erupting. They are delivered and the shine bright like the stars of heaven for ever and ever. The Jews are in mourning, the premise seems to be dead. Their lands taken and the temple gone.
Daniel gives a short term and long term answer, and is careful to be clear that the two are not the same by giving impossibly long time frames. The short term answer is yes, this will end and you will go back to Jerusalem. The long term answer is that god has a much bigger plan. Suffering will continue and be much worse than this, but salvation will be cosmic and eternal, much better than just getting the land and the temple back. God has a plan to save us for eternal life in his presence. The extra-earthly nature of God’s salvation is shown in the acts of power in the early chapters (fire can’t burn them and lions won’t tear them apart) sandwiched with visions and dreams of the impermanence of earthly kingdoms.