Dan 9:1-20

YOUR SANCTUARY IS DESOLATE
Daniel’s prayer is an account of the failures of God’s people, that caused them to fall into the captivity of Babylon. These same failures would also cause the captivity of the New Testament saints, in mystery Babylon, and the desolation of the Church, when the spirit of truth departed from His Church. They did not keep His commandments (vs 3-4, 9 -10), they departed from His precepts (vs 5-6) and they did not understand His truth (vs 12-13).
1 In the first year of Darius the son of Ahasuerus, of the seed of the Medes, who was made king over the realm of the Chaldeans, 
Dan 9:1
In the first year of Darius – which would be 539 BC, when Cyrus and the Medes conquered Babylon.
2 in the first year of his reign I, Daniel, understood by the books the number of the years whereof the word of Yihvah came to Jeremiah the prophet, for the accomplishing of the desolations of Jerusalem, even seventy years. 
Dan 9:2
Jeremiah…seventy years – as prophesied in  Jer 25:11,12; 29:10.

desolations – without the temple, prefiguring the desolation of God’s Church, the abomination of desolation. See notes at Zech 1:12. The word “desolation” in Jer 25:11, and Dan 9:2, tells us that the seventy-year period began when Jerusalem was “desolated,” and that is when the temple was also desolated. The Temple at Jerusalem was destroyed in the summer of 586 BC; and will be rebuilt, and dedicated in the spring of 516 BC, according to Ezra 6:15.
3 I set my face to the Lord God, to seek by prayer and petitions, with fasting and sackcloth and ashes. 4 I prayed to Yihvah my God, and made confession, and said, Oh, Lord, the great and dreadful God, who keeps covenant and lovingkindness with those who love him and keep his commandments, 
Dan 9:4
with those who love Him and keep His commandments – God’s Church will be restored to those who love Christ and God, and keep the commandments of Christ and God.
5 we have sinned, and have dealt perversely, and have done wickedly, and have rebelled, even turning aside from your precepts and from your ordinances; 6 neither have we listened to your servants the prophets, who spoke in your name to our kings, our princes, and our fathers, and to all the people of the land. 
Dan 9:5
departing from your precepts and Your judgments – Daniel begins to detail the failure, which begins with forsaking the word of God.
7 Lord, righteousness belongs to you, but to us confusion of face, as at this day; to the men of Judah, and to the inhabitants of Jerusalem, and to all Israel, who are near, and who are far off, through all the countries where you have driven them, because of their trespass that they have trespassed against you. 8 Lord, to us belongs confusion of face, to our kings, to our princes, and to our fathers, because we have sinned against you. 
Dan 9:7
because of the unfaithfulness – Israel became as a harlot, see also Ezek 16:9-60.
9 To the Lord our God belong mercies and forgiveness; for we have rebelled against him; 10 neither have we obeyed the voice of Yihvah our God, to walk in his laws, which he set before us by his servants the prophets. 11 Yes, all Israel have transgressed your law, even turning aside, that they should not obey your voice: therefore has the curse been poured out on us, and the oath that is written in the law of Moses the servant of God; for we have sinned against him.
Dan 9:10
we have not obeyed…all Israel has transgressed Your law – Daniel emphasized that “all” Israel broke the law,  just as “all men” received a mark, when they broke the commandment of God, as described in Rev 13:16.
12 He has confirmed his words, which he spoke against us, and against our judges who judged us, by bringing on us a great evil; for under the whole sky has not been done as has been done on Jerusalem. 13 As it is written in the law of Moses, all this evil is come on us: yet have we not entreated the favor of Yihvah our God, that we should turn from our iniquities, and have discernment in your truth. 14 Therefore the LORD has watched over the evil, and brought it on us; for the LORD our God is righteous in all his works which he does, and we have not obeyed his voice.
15 “Now, Lord our God, who has brought your people out of the land of Egypt with a mighty hand, and have gotten yourself renown, as it is today, we have sinned. We have done wickedly. 16 Lord, according to all your righteousness, please let your anger and your wrath be turned away from your city Jerusalem, your holy mountain; because for our sins and for the iniquities of our fathers, Jerusalem and your people have become a reproach to all who are around us.
Dan 9:13
understand Your truth – to which we can now say, the truth of the Gospel, and other truths of the Bible.
17 Now therefore, our God, listen to the prayer of your servant, and to his petitions, and cause your face to shine on your sanctuary that is desolate, for the Lord’s sake. 18 My God, turn your ear and hear. Open your eyes and see our desolations, and the city which is called by your name; for we do not present our petitions before you for our righteousness, but for your great mercies’ sake.
Dan 9:17
Your sanctuary, which is desolate – the Church shall be desolate of the holy spirit, just as Israel was desolated, as first described in verse 2.
19 Lord, hear; Lord, forgive; Lord, listen and do; don’t defer, for your own sake, my God, because your city and your people are called by your name. 
Dan 9:19
Your people who are called by Your name – like the Jews of Daniel’s Day, all those who call themselves after Christ, will also suffer God’s wrath, if they do not keep His commandments, and His word.
20 While I was speaking, and praying, and confessing my sin and the sin of my people Israel, and presenting my supplication before Yihvah my God for the holy mountain of my God; 
Dan 9:20
for the holy mountain of my God – the mountain is the foundation of God’s Church in Dan 2:35; Isa 2:2 and Mic 4:1.