Dan 9:12-13 And He has confirmed His words, which He spoke against us and against our judges who judged us, by bringing upon us a great disaster; for under the whole heaven such has never been done as what has been done to Jerusalem. “As it is written in the Law of Moses, all this disaster has come upon us; yet we have not made our prayer before the Lord our God, that we might turn from our iniquities and understand Your truth."
Daniel admitted that God was right in annihilating Jerusalem for He had constantly warned the judges and kings of His covenant with them but they refused to listen. Though God had constantly sent disasters after disasters for their disobedience, yet they had not come before Him with prayers of repentance and the understanding of truth.
His final judgment though extremely harsh, was the annihilation of Jerusalem and all the inhabitants were taken as captives to a foreign land as slaves. As a righteous God, He had no other choice but to destroy Jerusalem as He had promised in His covenant.
Dan 9:14-15 Therefore the Lord has kept the disaster in mind, and brought it upon us; for the Lord our God is righteous in all the works which He does, though we have not obeyed His voice. And now, O Lord our God, who brought Your people out of the land of Egypt with a mighty hand, and made Yourself a name, as it is this day— we have sinned, we have done wickedly!"
'We have sinned, we have done wickedly' was the resonance reaching the ears of God. This was the type of prayers and intercessions that Daniel had for Israel - the repentance of the sins and wickedness of the people.
Daniel, a righteous man and the greatly beloved of God, humbled himself by associating himself with the sinful Israelites and accepting their chastisements as the righteousness of God – annihilation of Jerusalem, their defeat, shame and humility as captives and slaves of the Babylonians.
Dan 10:11 And he said to me, “O Daniel, man greatly beloved, understand the words that I speak to you, and stand upright, for I have now been sent to you.” While he was speaking this word to me, I stood trembling.
Dan 9:20-22 Now while I was speaking, praying, and confessing my sin and the sin of my people Israel, and presenting my supplication before the Lord my God for the holy mountain of my God, yes, while I was speaking in prayer, the man Gabriel, whom I had seen in the vision at the beginning, being caused to fly swiftly, reached me about the time of the evening offering. And he informed me, and talked with me, and said, “O Daniel, I have now come forth to give you skill to understand.
When the prayers and intercessions of Daniel for Jerusalem and Israel pleased God, God gave him the skill of understanding the future of Israel.
Note – Not like those unlearned and blind pastors and church leaders, Daniel did not pray against God's will to destroy the Babylonians nor blame the devil for their miseries, but submit to His will for the chastisements.
Jude 1:9-10 Yet Michael the archangel, in contending with the devil, when he disputed about the body of Moses, dared not bring against him a reviling accusation, but said, “The Lord rebuke you!” But these speak evil of whatever they do not know; and whatever they know naturally, like brute beasts, in these things they corrupt themselves.
Brethren, when our prayers and intercessions are pleasing to Him, He will bless us with understanding. Then we do not need to live in darkness nor fear the coming Endtime events.